CARVIEW |
Select Language
HTTP/1.1 200 OK
Server: nginx
Date: Tue, 22 Jul 2025 16:18:16 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
ETag: W/"b0a7-5y10A8XJPEXDgWrjcvIkgKW2G5g"
Content-Encoding: gzip
Template class to instantiate the base classes for all stream classes.
Both this class template and its parent class, ios_base, define the components of streams that do not depend on whether the stream is an input or an output stream. ios_base describes the members that are independent of the template parameters, while this one describes the members that are dependent on the template parameters.
The class template adds to the information kept by its inherited ios_base component, the following:
Along with the member types inherited from ios_base:
State flag functions:
Formatting:
Other:
Reference
C library:
- <cassert> (assert.h)
- <cctype> (ctype.h)
- <cerrno> (errno.h)
-
<cfenv> (fenv.h)C++11
- <cfloat> (float.h)
-
<cinttypes> (inttypes.h)C++11
- <ciso646> (iso646.h)
- <climits> (limits.h)
- <clocale> (locale.h)
- <cmath> (math.h)
- <csetjmp> (setjmp.h)
- <csignal> (signal.h)
- <cstdarg> (stdarg.h)
-
<cstdbool> (stdbool.h)C++11
- <cstddef> (stddef.h)
-
<cstdint> (stdint.h)C++11
- <cstdio> (stdio.h)
- <cstdlib> (stdlib.h)
- <cstring> (string.h)
-
<ctgmath> (tgmath.h)C++11
- <ctime> (time.h)
-
<cuchar> (uchar.h)C++11
- <cwchar> (wchar.h)
- <cwctype> (wctype.h)
Containers:
-
<array>C++11
- <deque>
-
<forward_list>C++11
- <list>
- <map>
- <queue>
- <set>
- <stack>
-
<unordered_map>C++11
-
<unordered_set>C++11
- <vector>
-
Input/Output:
Multi-threading:
-
<atomic>C++11
-
<condition_variable>C++11
-
<future>C++11
-
<mutex>C++11
-
<thread>C++11
-
Other:
- <algorithm>
- <bitset>
-
<chrono>C++11
-
<codecvt>C++11
- <complex>
- <exception>
- <functional>
-
<initializer_list>C++11
- <iterator>
- <limits>
- <locale>
- <memory>
- <new>
- <numeric>
-
<random>C++11
-
<ratio>C++11
-
<regex>C++11
- <stdexcept>
- <string>
-
<system_error>C++11
-
<tuple>C++11
-
<type_traits>C++11
-
<typeindex>C++11
- <typeinfo>
- <utility>
- <valarray>
<ios>
types
manipulators
other functions
-
iostream_categoryC++11
-
basic_ios
- basic_ios::~basic_ios
- basic_ios::basic_ios
public members
- basic_ios::bad
- basic_ios::clear
- basic_ios::copyfmt
- basic_ios::eof
- basic_ios::exceptions
- basic_ios::fail
- basic_ios::fill
- basic_ios::good
- basic_ios::imbue
- basic_ios::narrow
- basic_ios::operator bool
- basic_ios::operator!
- basic_ios::rdbuf
- basic_ios::rdstate
- basic_ios::setstate
- basic_ios::tie
- basic_ios::widen
protected members
- basic_ios::init
-
basic_ios::moveC++11
-
basic_ios::set_rdbufC++11
-
basic_ios::swapC++11
class template
<ios> <iostream>
std::basic_ios
template <class charT, class traits = char_traits<charT> > class basic_ios;
Base class for streams (type-dependent components)
- ios_base
- basic_ios
- basic_istreambasic_ostream
Template class to instantiate the base classes for all stream classes.
Both this class template and its parent class, ios_base, define the components of streams that do not depend on whether the stream is an input or an output stream. ios_base describes the members that are independent of the template parameters, while this one describes the members that are dependent on the template parameters.
The class template adds to the information kept by its inherited ios_base component, the following:
field | member functions | description | |
---|---|---|---|
Formatting | fill character | fill | Character to pad a formatted field up to the field width (width). |
State | error state | rdstate setstate clear | The current error state of the stream. Individual values may be obtained by calling good, eof, fail and bad. See member type iostate. |
exception mask | exceptions | The state flags for which a failure exception is thrown. See member type iostate. | |
Other | tied stream | tie | Pointer to output stream that is flushed before each i/o operation on this stream. |
stream buffer | rdbuf | Pointer to the associated basic_streambuf object, which is charge of all input/output operations. |
Template parameters
- charT
- Character type.
This shall be a non-array POD type.
Aliased as member type basic_ios::char_type. - traits
- Character traits class that defines essential properties of the characters used by stream objects (see char_traits).
traits::char_type shall be the same as charT.
Aliased as member type basic_ios::traits_type.
Template instantiations
- ios
- Base class for streams (type-dependent components) (class)
- wios
- Base class for wide character streams (class)
Member types
member type | definition | notes |
---|---|---|
char_type | The first template parameter (charT) | |
traits_type | The second template parameter (traits) | defaults to: char_traits<charT> |
int_type | traits_type::int_type | |
pos_type | traits_type::pos_type | generally, the same as streampos |
off_type | traits_type::off_type | generally, the same as streamoff |
- event
- Type to indicate event type (public member type)
- event_callback
- Event callback function type (public member type)
- failure
- Base class for stream exceptions (public member class)
- fmtflags
- Type for stream format flags (public member type)
- Init
- Initialize standard stream objects (public member class)
- iostate
- Type for stream state flags (public member type)
- openmode
- Type for stream opening mode flags (public member type)
- seekdir
- Type for stream seeking direction flag (public member type)
Public member functions
- (constructor)
- Construct object (public member function)
- (destructor)
- Destroy object (public member function)
State flag functions:
- good
- Check whether state of stream is good (public member function)
- eof
- Check whether eofbit is set (public member function)
- fail
- Check whether failbit or badbit is set (public member function)
- bad
- Check whether badbit is set (public member function)
- operator!
- Evaluate stream (not) (public member function)
- operator bool
- Evaluate stream (public member function)
- rdstate
- Get error state flags (public member function)
- setstate
- Set error state flag (public member function)
- clear
- Set error state flags (public member function)
Formatting:
- copyfmt
- Copy formatting information (public member function)
- fill
- Get/set fill character (public member function)
Other:
- exceptions
- Get/set exceptions mask (public member function)
- imbue
- Imbue locale (public member function)
- tie
- Get/set tied stream (public member function)
- rdbuf
- Get/set stream buffer (public member function)
- narrow
- Narrow character (public member function)
- widen
- Widen character (public member function)
Protected member functions
- init
- Initialize object (protected member function)
- move
- Move internals (protected member function)
- swap
- Swap internals (protected member function)
- set_rdbuf
- Set stream buffer (protected member function)
Public member functions inherited from ios_base
- flags
- Get/set format flags (public member function)
- setf
- Set specific format flags (public member function)
- unsetf
- Clear specific format flags (public member function)
- precision
- Get/Set floating-point decimal precision (public member function)
- width
- Get/set field width (public member function)
- imbue
- Imbue locale (public member function)
- getloc
- Get current locale (public member function)
- xalloc
- Get new index for extensible array [static] (public static member function)
- iword
- Get integer element of extensible array (public member function)
- pword
- Get pointer element of extensible array (public member function)
- register_callback
- Register event callback function (public member function)
- sync_with_stdio
- Toggle synchronization with cstdio streams [static] (public static member function)
Home page | Privacy policy
© cplusplus.com, 2000-2025 - All rights reserved - v3.3.4s
Spotted an error? contact us
© cplusplus.com, 2000-2025 - All rights reserved - v3.3.4s
Spotted an error? contact us