Return-Path: Delivered-To: apmail-stdcxx-issues-archive@locus.apache.org Received: (qmail 82787 invoked from network); 16 Mar 2008 05:46:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Mar 2008 05:46:07 -0000 Received: (qmail 57654 invoked by uid 500); 16 Mar 2008 05:46:04 -0000 Delivered-To: apmail-stdcxx-issues-archive@stdcxx.apache.org Received: (qmail 57634 invoked by uid 500); 16 Mar 2008 05:46:04 -0000 Mailing-List: contact issues-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list issues@stdcxx.apache.org Received: (qmail 57625 invoked by uid 99); 16 Mar 2008 05:46:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 Mar 2008 22:46:04 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 Mar 2008 05:45:24 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5E88B234C09B for ; Sat, 15 Mar 2008 22:44:24 -0700 (PDT) Message-ID: <343751311.1205646264385.JavaMail.jira@brutus> Date: Sat, 15 Mar 2008 22:44:24 -0700 (PDT) From: "Farid Zaripov (JIRA)" To: issues@stdcxx.apache.org Subject: [jira] Closed: (STDCXX-769) __rw_debug_iter iterators are partially invalidated after swap() operation In-Reply-To: <321070025.1205645904370.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-769?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Farid Zaripov closed STDCXX-769. -------------------------------- Resolution: Won't Fix This is a just documenting issue. I don't think that it's will be fixed, because it's can be fixed only by removing these asserts. Closing as Won't Fix. > __rw_debug_iter iterators are partially invalidated after swap() operation > -------------------------------------------------------------------------- > > Key: STDCXX-769 > URL: https://issues.apache.org/jira/browse/STDCXX-769 > Project: C++ Standard Library > Issue Type: Bug > Components: 24. Iterators > Affects Versions: 4.1.2, 4.1.3, 4.1.4, 4.2.0 > Environment: All > Reporter: Farid Zaripov > Priority: Minor > > The __rw_debug_iter class contains pointer to associated container. After swap() operation the __rw_debug_iter iterators, obtained from container method (i.e. begin()) are associated with another container variable. Due to this any operation between iterators, obtained before swap and after swap will fail on assert (except operator==(), maybe some others). > The testcase: > {code:title=test.cpp} > #include > #include > int main () > { > typedef std::vector Vector; > typedef Vector::iterator Iter; > Vector v1, v2; > v1.push_back (1); > Iter v1_begin = v1.begin (); > v1.swap (v2); > assert (v1_begin == v2.begin ()); > assert (0 == v1_begin - v2.begin ()); > return 0; > }; > {code} > The testcase result: > {noformat} > rw/_iterbase.h:527: int __thiscall __rw::__rw_debug_iter >,int *,int *>::operator -(const class __rw::__rw_debug_iter >,int *,int *> &) const: Assertion '_C_cont && _C_cont == __rhs._C_cont' failed. > This application has requested the Runtime to terminate it in an unusual way. > Please contact the application's support team for more information. > {noformat} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.