39 namespace std _GLIBCXX_VISIBILITY(default)
41 _GLIBCXX_BEGIN_NAMESPACE_VERSION
43 template<
typename _CharT>
44 __timepunct<_CharT>::__timepunct(
size_t __refs)
45 : facet(__refs), _M_data(0), _M_c_locale_timepunct(0),
46 _M_name_timepunct(_S_get_c_name())
47 { _M_initialize_timepunct(); }
49 template<
typename _CharT>
50 __timepunct<_CharT>::__timepunct(__cache_type* __cache,
size_t __refs)
51 : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(0),
52 _M_name_timepunct(_S_get_c_name())
53 { _M_initialize_timepunct(); }
55 template<
typename _CharT>
56 __timepunct<_CharT>::__timepunct(__c_locale __cloc,
const char* __s,
58 : facet(__refs), _M_data(0), _M_c_locale_timepunct(0),
61 if (__builtin_strcmp(__s, _S_get_c_name()) != 0)
63 const size_t __len = __builtin_strlen(__s) + 1;
64 char* __tmp =
new char[__len];
65 __builtin_memcpy(__tmp, __s, __len);
66 _M_name_timepunct = __tmp;
69 _M_name_timepunct = _S_get_c_name();
72 { _M_initialize_timepunct(__cloc); }
75 if (_M_name_timepunct != _S_get_c_name())
76 delete [] _M_name_timepunct;
77 __throw_exception_again;
81 template<
typename _CharT>
82 __timepunct<_CharT>::~__timepunct()
84 if (_M_name_timepunct != _S_get_c_name())
85 delete [] _M_name_timepunct;
87 _S_destroy_c_locale(_M_c_locale_timepunct);
90 _GLIBCXX_END_NAMESPACE_VERSION