|
ALPSCore reference
|
#include <format.hpp>

Public Member Functions | |
| format_sentry (std::ostream &str) | |
| ~format_sentry () | |
| std::ios::fmtflags | saved_flags () const |
| std::ostream & | stream () |
| const std::ostream & | stream () const |
Undoes all formatting flag changes on stream when it goes out of scope.
Allows RAII-type use of a stream inside of a function while making sure that no format changes are visible outside of it:
void dump(std::ostream &out) {
alps::alea::internal::format_sentry sentry(out);
// flag changes here
// ...
} // restores flags on exit
Definition at line 32 of file format.hpp.
|
inlineexplicit |
Definition at line 35 of file format.hpp.
|
inline |
Definition at line 43 of file format.hpp.
|
inline |
Definition at line 49 of file format.hpp.
|
inline |
Definition at line 51 of file format.hpp.
|
inline |
Definition at line 53 of file format.hpp.
1.8.11