30 #ifndef _BASIC_IOS_TCC
31 #define _BASIC_IOS_TCC 1
33 #ifdef _GLIBCXX_SYSHDR
34 #pragma GCC system_header
37 #pragma GCC diagnostic push
38 #pragma GCC diagnostic ignored "-Wc++11-extensions" // extern template
40 namespace 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;
52 if (this->exceptions() & this->rdstate())
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;
100 this->flags(__rhs.flags());
101 this->width(__rhs.width());
102 this->precision(__rhs.precision());
104 this->fill(__rhs.
fill());
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>
121 locale __old(this->getloc());
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>
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
179 extern template class basic_ios<char>;
181 #ifdef _GLIBCXX_USE_WCHAR_T
182 extern template class basic_ios<wchar_t>;
186 _GLIBCXX_END_NAMESPACE_VERSION
189 #pragma GCC diagnostic pop