31#define _BASIC_IOS_TCC 1
34#pragma GCC system_header
37#pragma GCC diagnostic push
38#pragma GCC diagnostic ignored "-Wc++11-extensions"
40namespace std _GLIBCXX_VISIBILITY(default)
42_GLIBCXX_BEGIN_NAMESPACE_VERSION
44 template<
typename _CharT,
typename _Traits>
49 _M_streambuf_state = __state;
51 _M_streambuf_state = __state |
badbit;
53 __throw_ios_failure(__N(
"basic_ios::clear"));
56 template<
typename _CharT,
typename _Traits>
66 template<
typename _CharT,
typename _Traits>
78 _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ?
79 _M_local_word :
new _Words[__rhs._M_word_size];
82 _Callback_list* __cb = __rhs._M_callbacks;
84 __cb->_M_add_reference();
85 _M_call_callbacks(erase_event);
86 if (_M_word != _M_local_word)
91 _M_dispose_callbacks();
95 for (
int __i = 0; __i < __rhs._M_word_size; ++__i)
96 __words[__i] = __rhs._M_word[__i];
98 _M_word_size = __rhs._M_word_size;
105 _M_ios_locale = __rhs.
getloc();
106 _M_cache_locale(_M_ios_locale);
108 _M_call_callbacks(copyfmt_event);
117 template<
typename _CharT,
typename _Traits>
123 _M_cache_locale(__loc);
124 if (this->
rdbuf() != 0)
125 this->
rdbuf()->pubimbue(__loc);
129 template<
typename _CharT,
typename _Traits>
137 _M_cache_locale(_M_ios_locale);
155 _M_fill = _M_ctype->widen(
' ');
159 _M_fill_init =
false;
162 _M_exception = goodbit;
164 _M_streambuf_state = __sb ? goodbit : badbit;
167 template<
typename _CharT,
typename _Traits>
169 basic_ios<_CharT, _Traits>::_M_cache_locale(
const locale& __loc)
171 _M_ctype = std::__try_use_facet<__ctype_type>(__loc);
172 _M_num_put = std::__try_use_facet<__num_put_type>(__loc);
173 _M_num_get = std::__try_use_facet<__num_get_type>(__loc);
178#if _GLIBCXX_EXTERN_TEMPLATE
181#ifdef _GLIBCXX_USE_WCHAR_T
186_GLIBCXX_END_NAMESPACE_VERSION
189#pragma GCC diagnostic pop
constexpr tuple< _Elements &... > tie(_Elements &... __args) noexcept
Return a tuple of lvalue references bound to the arguments.
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
ISO C++ entities toplevel namespace is std.
Template class basic_ios, virtual base class for all stream classes.
void clear(iostate __state=goodbit)
[Re]sets the error state.
locale imbue(const locale &__loc)
Moves to a new locale.
basic_ostream< _CharT, _Traits > * tie() const
Fetches the current tied stream.
iostate exceptions() const
Throwing exceptions on errors.
basic_ios & copyfmt(const basic_ios &__rhs)
Copies fields of __rhs into this.
iostate rdstate() const
Returns the error state of the stream buffer.
void init(basic_streambuf< _CharT, _Traits > *__sb)
All setup is performed here.
char_type fill() const
Retrieves the empty character.
basic_streambuf< _CharT, _Traits > * rdbuf() const
Accessing the underlying buffer.
basic_ios(basic_streambuf< _CharT, _Traits > *__sb)
Constructor performs initialization.
The actual work of input and output (interface).
_Ios_Iostate iostate
This is a bitmask type.
streamsize precision() const
Flags access.
locale imbue(const locale &__loc)
Setting a new locale.
fmtflags flags() const
Access to format flags.
static const iostate badbit
Indicates a loss of integrity in an input or output sequence (such as an irrecoverable read error fro...
streamsize width() const
Flags access.
locale getloc() const
Locale access.
Container class for localization functionality.