From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2299 invoked by alias); 7 Jan 2003 16:26:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 2284 invoked by uid 71); 7 Jan 2003 16:26:01 -0000 Date: Tue, 07 Jan 2003 16:26:00 -0000 Message-ID: <20030107162601.2283.qmail@sources.redhat.com> To: paolo@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Paolo Carlini Subject: Re: c++/9215: Problem with reserting a stream to default using setf Reply-To: Paolo Carlini X-SW-Source: 2003-01/txt/msg00451.txt.bz2 List-Id: The following reply was made to PR libstdc++/9215; it has been noted by GNATS. From: Paolo Carlini To: Jon Gjerde Cc: paolo@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: c++/9215: Problem with reserting a stream to default using setf Date: Tue, 07 Jan 2003 17:20:57 +0100 Jon Gjerde wrote: >Thank you for the quick reply. > >Is your solution cout.setf(ios_base::floatfield, ios_base::floatfield) equal >to unsetf(ios_base::floatfield)? > Yes. An alternate solution would be cout.setf(ios_base::fmtflags(0), ios_base::floatfield) >I am now using the latter, and it seems to >do the same as setf(0, ios_base::floatfield) when using the Sun CC compiler. >Btw, the setf(0, ios_base::floatfield) statement is taken from an example in >The C++ Programming language by Bjarne Stroustrup. > ;) Well, I may be wrong, but in the _final_ standard I cannot find examples of a 'plain' 0 but always ios_base::fmtflags(0). Otherwise, make use of what I replied earlier today. Barring any additional clarification on the '0' vs ios_base::fmtflags(0) issue, I would close the PR. Ciao, Paolo. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9215