Celeritas  0.5.0-86+4a8eea4
Public Member Functions | List of all members
celeritas::ScopedStreamFormat Class Reference

Save a stream's state and restore on destruction. More...

#include <ScopedStreamFormat.hh>

Public Member Functions

 ScopedStreamFormat (std::ios *s)
 Construct with defaults.
 
 ~ScopedStreamFormat ()
 Restore formats on destruction.
 
 CELER_DELETE_COPY_MOVE (ScopedStreamFormat)
 

Detailed Description

Save a stream's state and restore on destruction.

Example:

{
ScopedStreamFormat save_fmt(&std::cout);
std::cout << setprecision(16) << 1.0;
}
ScopedStreamFormat(std::ios *s)
Construct with defaults.
Definition: ScopedStreamFormat.hh:53

Member Function Documentation

◆ CELER_DELETE_COPY_MOVE()

celeritas::ScopedStreamFormat::CELER_DELETE_COPY_MOVE ( ScopedStreamFormat  )

Prevent copying and moving for RAII class


The documentation for this class was generated from the following file: