PATCH: Re: iostream changes locale to format a number

Paolo Carlini pcarlini@unitus.it
Sat May 4 09:10:00 GMT 2002


Sorry, I sent the wrong testcase (redundant #ifdef). This is what I have 
tested:

#include <clocale>
#include <sstream>
#include <cassert>

void
test0x()
{
  using namespace std;

  bool test = true;

  ostringstream oss;
  string loc1 = setlocale(LC_ALL, "de_DE");
  oss << 1;
  string loc2 = setlocale(LC_ALL, NULL);
  assert( loc1 == loc2 );
}

int main()
{
  test0x();
}

Ciao,
Paolo.



More information about the Libstdc++ mailing list