• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: string::stringstream broken with gg 4.2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: string::stringstream broken with gg 4.2


  • Subject: Re: string::stringstream broken with gg 4.2
  • From: Luca Ciciriello <email@hidden>
  • Date: Sat, 17 Oct 2009 16:10:19 +0200

Sorry, I'm unable to reproduce your behavior. Your code just works fine with both compiler (4.0 and 4.2) producing the result ###31$9.87654.


I'm using an Intel MacBook with Xcode 3.1.3 (no iPhone SDK) on MacOS X 10.5.8 

Luca.


On Oct 17, 2009, at 2:46 PM, Gabriel Beauchemin wrote:

The following will not work properly when compiled with gcc 4.2 (10.5 or 10.6 sdk).
I've also disabled
_GLIBCXX_DEBUG=0
_GLIBCXX_DEBUG_PEDANTIC=0

Only the << char* work. Known regression ?

Thanks

#include <sstream>
#include <iostream>

int main()
{
std::ostringstream stm;
// Output a char*
stm << "###";
// Output an int
stm << 31;
// Output a char
stm << '$';
// Output a double
stm << 9.87654;

// Retrieve the resulting string
std::cout << stm.str() << std::endl;
}

running with gcc 4.0 -> ###31$9.87654
Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden

References: 
 >string::stringstream broken with gg 4.2 (From: Gabriel Beauchemin <email@hidden>)

  • Prev by Date: string::stringstream broken with gg 4.2
  • Next by Date: Re: Xcode Installation such that the Make Command is Operationa
  • Previous by thread: string::stringstream broken with gg 4.2
  • Next by thread: Re: string::stringstream broken with gg 4.2
  • Index(es):
    • Date
    • Thread