Return-Path: Delivered-To: apmail-stdcxx-issues-archive@locus.apache.org Received: (qmail 19655 invoked from network); 22 Apr 2008 03:44:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Apr 2008 03:44:42 -0000 Received: (qmail 21583 invoked by uid 500); 22 Apr 2008 03:44:43 -0000 Delivered-To: apmail-stdcxx-issues-archive@stdcxx.apache.org Received: (qmail 21558 invoked by uid 500); 22 Apr 2008 03:44:43 -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 21547 invoked by uid 99); 22 Apr 2008 03:44:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Apr 2008 20:44:43 -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; Tue, 22 Apr 2008 03:44:08 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id EFDBA234C0F6 for ; Mon, 21 Apr 2008 20:41:21 -0700 (PDT) Message-ID: <1617300267.1208835681968.JavaMail.jira@brutus> Date: Mon, 21 Apr 2008 20:41:21 -0700 (PDT) From: "Martin Sebor (JIRA)" To: issues@stdcxx.apache.org Subject: [jira] Closed: (STDCXX-766) std::ios::copyfmt() doesn't copy tie(), getloc() In-Reply-To: <1956837422.1205613504238.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-766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Sebor closed STDCXX-766. ------------------------------- Fix and regression test merged into 4.2.x. Test verified as passing in nightly builds. > std::ios::copyfmt() doesn't copy tie(), getloc() > ------------------------------------------------ > > Key: STDCXX-766 > URL: https://issues.apache.org/jira/browse/STDCXX-766 > Project: C++ Standard Library > Issue Type: Bug > Components: 27. Input/Output > Affects Versions: 4.1.2, 4.1.3, 4.1.4, 4.2.0 > Environment: all > Reporter: Martin Sebor > Assignee: Martin Sebor > Fix For: 4.2.1 > > Original Estimate: 2h > Time Spent: 3h > Remaining Estimate: 0h > > The following test fails with the latest trunk. > {noformat} > $ cat t.cpp && make t && ./t > #include > #include > #include > #include > #include > #define ASSERT(expr) \ > (expr) ? (void)0 \ > : (void)std::fprintf (stderr, "line %d: Assertion failed: %s\n", \ > __LINE__, #expr) > int main () > { > std::ios x ((std::streambuf*)1); > x.tie ((std::ostream*)2); > std::ios y (0); > const std::ios::iostate x_rdstate = x.rdstate (); > const std::streambuf* const x_rdbuf = x.rdbuf (); > const std::locale loc = > std::locale (std::locale::classic (), new std::numpunct()); > y.tie (x.tie () + 1); > y.exceptions (y.eofbit); > y.flags (y.boolalpha | y.scientific); > y.precision (x.precision () + 1); > y.width (x.width () + 1); > y.fill (x.fill () + 1); > y.imbue (loc); > ASSERT (x.tie () != y.tie ()); > ASSERT (x.getloc () != y.getloc ()); > x.copyfmt (y); > ASSERT (x.rdbuf () == x_rdbuf); > ASSERT (x.tie () == y.tie ()); > ASSERT (x.rdstate () == x_rdstate); > ASSERT (x.exceptions () == y.exceptions ()); > ASSERT (x.flags () == y.flags ()); > ASSERT (x.precision () == y.precision ()); > ASSERT (x.width () == y.width ()); > ASSERT (x.fill () == y.fill ()); > ASSERT (x.getloc () == y.getloc ()); > } > gcc -c -I/home/sebor/stdcxx/include/ansi -D_RWSTDDEBUG -I/home/sebor/stdcxx/i > nclude -I/build/sebor/stdcxx-gcc-4.1.2-11S-LVS/include -I/home/sebor/stdcxx/incl > ude/ansi -I/build/sebor/PlumHall/lvs07a/conform -I/build/sebor/PlumHall/lvs07a/d > st.3 -pedantic -nostdinc++ -g -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite- > strings -Wno-long-long -Wcast-align t.cpp > gcc t.o -o t -L/build/sebor/stdcxx-gcc-4.1.2-11S-LVS/lib -lstd11S -lsupc++ -lm > > line 39: Assertion failed: x.tie () == y.tie () > line 46: Assertion failed: x.getloc () == y.getloc () > {noformat} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.