http://llvm.org/bugs/show_bug.cgi?id=17027

            Bug ID: 17027
           Summary: std::ostringstream produces unexpected results
           Product: libc++
           Version: unspecified
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

On OS X, using clang & libc++ as shipped with XCode 4.6.3.

The following code fails:



#include <iomanip>
#include <sstream>
#include <cassert>

int main()
{
    std::ostringstream os;
    os << std::setw(2) << 1;
    assert( os.str() == " 1" );
}



when compiled with:

clang++ -std=c++11 -stdlib=libc++ example.cpp

A cursory examination suggests that the default fill character is being set to
-1.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to