Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 81019 invoked from network); 20 Nov 2007 17:36:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Nov 2007 17:36:07 -0000 Received: (qmail 68296 invoked by uid 500); 20 Nov 2007 17:35:54 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 68277 invoked by uid 500); 20 Nov 2007 17:35:53 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 68133 invoked by uid 99); 20 Nov 2007 17:35:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Nov 2007 09:35:53 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Nov 2007 17:35:51 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E1DF6714240 for ; Tue, 20 Nov 2007 09:35:44 -0800 (PST) Message-ID: <14923796.1195580144922.JavaMail.jira@brutus> Date: Tue, 20 Nov 2007 09:35:44 -0800 (PST) From: "Travis Vitek (JIRA)" To: stdcxx-dev@incubator.apache.org Subject: [jira] Commented: (STDCXX-612) many iterator types do not work with types that implement unary operator& In-Reply-To: <19456180.1193099870699.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/STDCXX-612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12543962 ] Travis Vitek commented on STDCXX-612: ------------------------------------- The following change to tr1/_smartptr.h removes an assertion that _C_ptr is valid. I don't know if the assert was necessary in the first place, but it probably shouldn't be removed without reason. element_type* operator->() const { - return &**this; + return _C_ptr; } Also, I think the _RWSTD_ADDRESS_OF() would be easy to accidentally misuse. _RWSTD_ADDRESS_OF (int, i); // cast address of i to an int Wouldn't it make more sense for __rw_address_of to do the heavy lifting, and to write the macro to call through? That would remove requirement for the first parameter, which would cleanup the code just a little bit. It might also be a good idea to add an overload of __rw_address_of for const references. > 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 > #include > #include > #include > #include > struct S > { > void operator& () const {}; > }; > int main () > { > // this is just a compile test, it is not intended to run > std::reverse_iterator().operator->(); > std::set::iterator().operator->(); > std::deque::iterator().operator->(); > std::list::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.