to_stream sets failbit if unable to format
* If a formatting flag requests data that is not available in the Streamable object, or if the Streamable object answers !ok(), failbit is set.
This commit is contained in:
1 parent
0125d330ab
commit
1d9e49ea21
2 files changed
+317
-280
No files matched your search
@@ -69,10 +69,10 @@ main()
|
||||
assert(os.str() == "32767-12-31 00:00:01.2096");
|
||||
os.str("");
|
||||
|
||||
os << format("%F %T", jan/1/year::min());
|
||||
assert(os.str() == "-32767-01-01 00:00:00");
|
||||
os << format("%F", jan/1/year::min());
|
||||
assert(os.str() == "-32767-01-01");
|
||||
os.str("");
|
||||
os << format("%F %T", dec/last/year::max());
|
||||
assert(os.str() == "32767-12-31 00:00:00");
|
||||
os << format("%F", dec/last/year::max());
|
||||
assert(os.str() == "32767-12-31");
|
||||
os.str("");
|
||||
}
|
||||
Reference in new issue
Block a user