https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207918
Bug ID: 207918
Summary: C++ ostream operator << broken for unsigned long long
when using showbase with octal format
Product: Base System
Version: 10.3-BETA2
Hardware: amd64
OS: Any
Status: New
Severity: Affects Many People
Priority: ---
Component: standards
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
CC: [email protected]
C++ library issue.
Using showbase with ostreams causes truncation of unsigned long long when
output format is octal.
#include <iostream>
#include <iomanip>
int main(int argc, char *argv[])
{
std::cout << std::oct;
std::cout << std::numeric_limits<unsigned long long>::max()
<< '\n';
std::cout << std::showbase
<< std::numeric_limits<unsigned long long>::max()
<< '\n';
return 0;
}
Outputs:
1777777777777777777777
0177777777777777777777
Problem exists for 10.3-PRERELEASE r296556 for amd64 as well as 11.0-CURRENT
r292991 for arm.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to "[email protected]"