Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 7957 invoked from network); 2 Nov 2007 14:50:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Nov 2007 14:50:22 -0000 Received: (qmail 26111 invoked by uid 500); 2 Nov 2007 14:50:10 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 26099 invoked by uid 500); 2 Nov 2007 14:50:10 -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 26088 invoked by uid 99); 2 Nov 2007 14:50:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Nov 2007 07:50:10 -0700 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; Fri, 02 Nov 2007 14:50:11 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B6ED371422C for ; Fri, 2 Nov 2007 07:49:50 -0700 (PDT) Message-ID: <26000237.1194014990746.JavaMail.jira@brutus> Date: Fri, 2 Nov 2007 07:49:50 -0700 (PDT) From: "Farid Zaripov (JIRA)" To: stdcxx-dev@incubator.apache.org Subject: [jira] Commented: (STDCXX-635) std::deque::swap invalidates begin() and end() iterators on empty container In-Reply-To: <30284276.1193947430790.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-635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539601 ] Farid Zaripov commented on STDCXX-635: -------------------------------------- The addition information can be found in this thread: http://www.mail-archive.com/stdcxx-dev@incubator.apache.org/msg03868.html > std::deque::swap invalidates begin() and end() iterators on empty container > --------------------------------------------------------------------------- > > Key: STDCXX-635 > URL: https://issues.apache.org/jira/browse/STDCXX-635 > Project: C++ Standard Library > Issue Type: Bug > Components: 23. Containers > Affects Versions: 4.2 > Environment: All > Reporter: Farid Zaripov > Priority: Minor > Fix For: 4.2.1 > > > The program below aborts on assert. > #include > #include > int main () > { > typedef std::deque Deque; > typedef Deque::iterator Iter; > Deque d1, d2; > Iter iters [2][2] = { > { d1.begin (), d1.end () }, > { d2.begin (), d2.end () } > }; > d1.swap (d2); > assert (d2.begin () == iters [0][0]); > assert (d2.end ()== iters [0][1]); > assert (d1.begin () == iters [1][0]); > assert (d1.end ()== iters [1][1]); > return 0; > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.