std::ios_base::Init

This class is used to ensure that the default C++ streams (std::cin, std::cout, etc.) are properly initialized and destructed. The class tracks how many instances of it are created and initializes the C++ streams when the first instance is constructed as well as flushes the output streams when the last instance is destructed.

# Declarations

class Init;

# Defect reports

DRApplied toBehavior as publishedCorrect behavior
LWG 1123C++98the behaviors of the constructor and the destructordepend on an exposition-only static data member init_cntremoved the dependency

# See also