...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
std::ios_base::xalloc
and std::ios_base::iword
.
Then one could safely modify the flags, and one could define manipulators
that do so. However, for that to work with dynamically linked libraries,
a .cpp
file would have to be added to the library. It was judged be more desirable
to have a header-only library, than to have mutable flags and manipulators.
nonfinite_num_put
throws an exception when the trap_infinity
or trap_nan
flag is set
and an attempt is made to format infinity or NaN. It would be better
if the facet set the fail bit
of the stream. However, facets
derived from std::num_put
do not have access to the stream
state.