You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Farid Zaripov (JIRA)" <ji...@apache.org> on 2007/11/20 16:57:43 UTC

[jira] Commented: (STDCXX-612) many iterator types do not work with types that implement unary operator&

    [ https://issues.apache.org/jira/browse/STDCXX-612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12543925 ] 

Farid Zaripov commented on STDCXX-612:
--------------------------------------

ChangeLog:

  * include/rw/_defs.h: #define _RWSTD_ADDRESS_OF - new macro to
  obtain the memory address of the object.
  (_RWSTD_OPERATOR_ARROW): Add "type" parameter. Use
  _RWSTD_ADDRESS_OF() macro.
  * include/deque (_RWSTD_OPERATOR_ARROW): Split signature to two
  parameters: type and rest.
  * include/deque_spec.h (_RWSTD_OPERATOR_ARROW): Ditto.
  * include/list (_RWSTD_OPERATOR_ARROW): Ditto.
  * include/list_spec.h (_RWSTD_OPERATOR_ARROW): Ditto.
  * include/rw/_iterator.h (_RWSTD_OPERATOR_ARROW): Ditto.
  * include/rw/_iterbase.h (_RWSTD_OPERATOR_ARROW): Ditto.
  * include/rw/_streamiter.h (_RWSTD_OPERATOR_ARROW): Ditto.
  * include/rw/_tree.h (_RWSTD_OPERATOR_ARROW): Ditto.
  * tests/include/alg_test.h (_RWSTD_OPERATOR_ARROW): Ditto.
  * include/rw/_specialized.h (__rw_address_of): New template function
  to get the address of the variable.
  (uninitialized_copy): use __rw_address_of() instead of operator&.
  (uninitialized_fill): Ditto.
  * include/tr1/_smartptr.h (operator->): return _C_ptr instead of using
  operator*().


> many iterator types do not work with types that implement unary operator&
> -------------------------------------------------------------------------
>
>                 Key: STDCXX-612
>                 URL: https://issues.apache.org/jira/browse/STDCXX-612
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 24. Iterators
>    Affects Versions: 4.2.0
>            Reporter: Travis Vitek
>            Assignee: Farid Zaripov
>             Fix For: 4.2.1
>
>         Attachments: operator_arrow.patch
>
>
> Code that uses the macro _RWSTD_OPERATOR_ARROW will be affected by this issue. Code that has '&*' is also very likely to be affected.
> #include <deque>
> #include <iterator>
> #include <list>
> #include <set>
> #include <vector>
> struct S
> {
>    void operator& () const {};
> };
> int main ()
> {
>    // this is just a compile test, it is not intended to run
>    std::reverse_iterator<S*>().operator->();
>    std::set<S>::iterator().operator->();
>    std::deque<S>::iterator().operator->();
>    std::list<S>::iterator().operator->();
>    return 0;
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.