std::basic_ios<CharT,Traits>::basic_ios
From cppreference.com
C++
Feature test macros (C++20)
Concepts library (C++20)
Metaprogramming library (C++11)
Ranges library (C++20)
Filesystem library (C++17)
Concurrency support library (C++11)
Execution control library (C++26)
Input/output library
Print functions (C++23)
Buffers
(C++23)
(C++98/26*)
(C++20)
Streams
Abstractions
File I/O
String I/O
Array I/O
(C++23)
(C++23)
(C++23)
(C++98/26*)
(C++98/26*)
(C++98/26*)
Synchronized Output
(C++20)
Types
Error category interface
(C++11)
(C++11)
std::basic_ios
Member functions
basic_ios::basic_ios
State functions
Formatting
Miscellaneous
Protected member functions
(C++11)
(C++11)
(C++11)
protected:
basic_ios();
(1)
basic_ios();
public:
explicit basic_ios( std::basic_streambuf <CharT, Traits>* sb );
(2)
explicit basic_ios( std::basic_streambuf <CharT, Traits>* sb );
(3)
private:
basic_ios( const basic_ios& );
(until C++11)
basic_ios( const basic_ios& );
public:
basic_ios( const basic_ios& ) = delete;
(since C++11)
basic_ios( const basic_ios& ) = delete;
Constructs a new std::basic_ios
object.
1) Default constructor. The internal state is not initialized. init() must be called before the first use of the object or before destructor, otherwise the behavior is undefined.
2) Initializes the internal state by calling init(sb). The associated stream buffer is set to sb.
3) The copy constructor is declared private and not defined(until C++11)explicitly defined as deleted(since C++11): I/O streams are not CopyConstructible.
[edit] Parameters
sb
-
stream buffer to associate to
[edit] Defect reports
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
DR | Applied to | Behavior as published | Correct behavior |
---|---|---|---|
LWG 1249 | C++98 | internal state did not need to be initialized before first use | also needs to be initialized |