https://bugs.llvm.org/show_bug.cgi?id=52301

            Bug ID: 52301
           Summary: boolalpha seems to ignore output width
           Product: libc++
           Version: 11.0
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: edward.vo...@hpe.com
                CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com

It seems that the boolalpha fmtflag ignores any specified width. 

Here's a cut/paste from a cut/paste from a cygwin session:

$ cat t.cpp

#include <iomanip>
#include <sstream>
#include <iostream>
using namespace std;
int main(int, char *[])
{
        stringbuf sbuf;
        ostream ostr(&sbuf);
        ostr <<  boolalpha <<  setw(7) << (bool)false;
        string s = sbuf.str();
        cout << "'" << sbuf.str() << "'";
}

VogelEd@XLB3502Q4E ~/temp
$ clang++ -o a.out t.cpp

VogelEd@XLB3502Q4E ~/temp
$ ./a.out
'  false'
VogelEd@XLB3502Q4E ~/temp
$ clang++ -o a.out -stdlib=libc++ t.cpp

VogelEd@XLB3502Q4E ~/temp
$ ./a.out
'false'
VogelEd@XLB3502Q4E ~/temp

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to