From stdcxx-dev-return-3929-apmail-incubator-stdcxx-dev-archive=incubator.apache.org@incubator.apache.org Mon Jul 09 04:49:26 2007 Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 32935 invoked from network); 9 Jul 2007 04:49:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Jul 2007 04:49:26 -0000 Received: (qmail 55200 invoked by uid 500); 9 Jul 2007 04:49:28 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 55183 invoked by uid 500); 9 Jul 2007 04:49:28 -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 55172 invoked by uid 99); 9 Jul 2007 04:49:28 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Jul 2007 21:49:28 -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; Sun, 08 Jul 2007 21:49:25 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3620471404B for ; Sun, 8 Jul 2007 21:49:05 -0700 (PDT) Message-ID: <10562616.1183956545208.JavaMail.jira@brutus> Date: Sun, 8 Jul 2007 21:49:05 -0700 (PDT) From: "Martin Sebor (JIRA)" To: stdcxx-dev@incubator.apache.org Subject: [jira] Resolved: (STDCXX-478) std::locale::operator==() inconsistent for locales with the same user-defined facets In-Reply-To: <1997765.1183936504474.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-478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Sebor resolved STDCXX-478. --------------------------------- Resolution: Fixed Fix Version/s: 4.2 Resolved. Will close after a regression test has been added to the test suite. > std::locale::operator==() inconsistent for locales with the same user-defined facets > ------------------------------------------------------------------------------------ > > Key: STDCXX-478 > URL: https://issues.apache.org/jira/browse/STDCXX-478 > Project: C++ Standard Library > Issue Type: Bug > Components: 22. Localization > Affects Versions: 4.1.3, 4.1.2 > Reporter: Martin Sebor > Assignee: Martin Sebor > Fix For: 4.2 > > > The program below is intended to take advantage of the stdcxx extension whereby two unnamed locales compare equal when they represent the exact same object (i.e., when all their facets are exactly same). The program passes the first assertion but aborts in the second one: > $ cat t.cpp && make t && ./t > #include > #include > #include > struct A: std::num_put { A (): std::num_put(1) { } }; > struct B: std::num_put { B (): std::num_put(1) { } }; > int main () > { > const std::locale en ("en_US"); > const A* const a = new A; > const B* const b = new B; > { > const std::locale usr1 (std::locale (en, a), b); > const std::locale usr2 (std::locale (en, a), b); > std::printf ("\"%s\" == \"%s\"\n", > usr1.name ().c_str (), usr2.name ().c_str ()); > assert (usr1 == usr2); > } > { > const std::locale usr1 (std::locale (en, a), b); > const std::locale usr2 (std::locale (en, b), a); > std::printf ("\"%s\" == \"%s\"\n", > usr1.name ().c_str (), usr2.name ().c_str ()); > assert (usr1 == usr2); > } > } > icc -c -I/home/sebor/stdcxx/include/ansi -D_RWSTDDEBUG -D_REENTRANT -I/home/sebor/stdcxx/include -I/build/sebor/stdcxx-icc-10.0.025-15S/include -I/home/sebor/stdcxx/examples/include -cxxlib-nostd -g -w1 t.cpp > icc t.o -o t -cxxlib-nostd -lpthread -L/build/sebor/stdcxx-icc-10.0.025-15S/lib -lstd15S -lcxaguard -lsupc++ -lm > "*" == "*" > "*" == "*" > t: t.cpp:32: int main(): Assertion `usr1 == usr2' failed. > Aborted -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.