31 #ifndef _BASIC_IOS_TCC
32 #define _BASIC_IOS_TCC 1
34 #pragma GCC system_header
36 _GLIBCXX_BEGIN_NAMESPACE(std)
38 template<typename _CharT, typename _Traits>
43 _M_streambuf_state = __state;
45 _M_streambuf_state = __state | badbit;
46 if (this->exceptions() & this->rdstate())
47 __throw_ios_failure(__N(
"basic_ios::clear"));
50 template<
typename _CharT,
typename _Traits>
60 template<
typename _CharT,
typename _Traits>
72 _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ?
73 _M_local_word :
new _Words[__rhs._M_word_size];
76 _Callback_list* __cb = __rhs._M_callbacks;
78 __cb->_M_add_reference();
79 _M_call_callbacks(erase_event);
80 if (_M_word != _M_local_word)
85 _M_dispose_callbacks();
89 for (
int __i = 0; __i < __rhs._M_word_size; ++__i)
90 __words[__i] = __rhs._M_word[__i];
92 _M_word_size = __rhs._M_word_size;
94 this->flags(__rhs.
flags());
95 this->width(__rhs.
width());
97 this->tie(__rhs.
tie());
98 this->fill(__rhs.
fill());
99 _M_ios_locale = __rhs.
getloc();
100 _M_cache_locale(_M_ios_locale);
102 _M_call_callbacks(copyfmt_event);
111 template<
typename _CharT,
typename _Traits>
115 locale __old(this->getloc());
116 ios_base::imbue(__loc);
117 _M_cache_locale(__loc);
118 if (this->rdbuf() != 0)
119 this->rdbuf()->pubimbue(__loc);
123 template<
typename _CharT,
typename _Traits>
131 _M_cache_locale(_M_ios_locale);
146 _M_fill_init =
false;
149 _M_exception = goodbit;
151 _M_streambuf_state = __sb ? goodbit : badbit;
154 template<
typename _CharT,
typename _Traits>
158 if (__builtin_expect(has_facet<__ctype_type>(__loc),
true))
159 _M_ctype = &use_facet<__ctype_type>(__loc);
163 if (__builtin_expect(has_facet<__num_put_type>(__loc),
true))
164 _M_num_put = &use_facet<__num_put_type>(__loc);
168 if (__builtin_expect(has_facet<__num_get_type>(__loc),
true))
169 _M_num_get = &use_facet<__num_get_type>(__loc);
177 #if _GLIBCXX_EXTERN_TEMPLATE
178 extern template class basic_ios<char>;
180 #ifdef _GLIBCXX_USE_WCHAR_T
181 extern template class basic_ios<wchar_t>;
185 _GLIBCXX_END_NAMESPACE