37 namespace std _GLIBCXX_VISIBILITY(default)
39 _GLIBCXX_BEGIN_NAMESPACE_VERSION
41 template<
typename _CharT>
42 __timepunct<_CharT>::__timepunct(
size_t __refs)
43 : facet(__refs), _M_data(0), _M_c_locale_timepunct(0),
44 _M_name_timepunct(_S_get_c_name())
45 { _M_initialize_timepunct(); }
47 template<
typename _CharT>
48 __timepunct<_CharT>::__timepunct(__cache_type* __cache,
size_t __refs)
49 : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(0),
50 _M_name_timepunct(_S_get_c_name())
51 { _M_initialize_timepunct(); }
53 template<
typename _CharT>
54 __timepunct<_CharT>::__timepunct(__c_locale __cloc,
const char* __s,
56 : facet(__refs), _M_data(0), _M_c_locale_timepunct(0),
59 if (__builtin_strcmp(__s, _S_get_c_name()) != 0)
61 const size_t __len = __builtin_strlen(__s) + 1;
62 char* __tmp =
new char[__len];
63 __builtin_memcpy(__tmp, __s, __len);
64 _M_name_timepunct = __tmp;
67 _M_name_timepunct = _S_get_c_name();
70 { _M_initialize_timepunct(__cloc); }
73 if (_M_name_timepunct != _S_get_c_name())
74 delete [] _M_name_timepunct;
75 __throw_exception_again;
79 template<
typename _CharT>
80 __timepunct<_CharT>::~__timepunct()
82 if (_M_name_timepunct != _S_get_c_name())
83 delete [] _M_name_timepunct;
85 _S_destroy_c_locale(_M_c_locale_timepunct);
88 _GLIBCXX_END_NAMESPACE_VERSION