string::stringstream broken with gg 4.2
string::stringstream broken with gg 4.2
- Subject: string::stringstream broken with gg 4.2
- From: Gabriel Beauchemin <email@hidden>
- Date: Sat, 17 Oct 2009 08:46:52 -0400
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
running with gcc 4.2 -> ###
_______________________________________________
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