diff options
Diffstat (limited to 'libstdc++-v3/config/locale/gnu/time_members.h')
-rw-r--r-- | libstdc++-v3/config/locale/gnu/time_members.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/libstdc++-v3/config/locale/gnu/time_members.h b/libstdc++-v3/config/locale/gnu/time_members.h index 8ef7a07107c..6badaacbfa0 100644 --- a/libstdc++-v3/config/locale/gnu/time_members.h +++ b/libstdc++-v3/config/locale/gnu/time_members.h @@ -36,7 +36,17 @@ template<typename _CharT> __timepunct<_CharT>::__timepunct(size_t __refs) - : locale::facet(__refs) + : facet(__refs), _M_data(NULL) + { +#if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)) + _M_name_timepunct = _S_c_name; +#endif + _M_initialize_timepunct(); + } + + template<typename _CharT> + __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) + : facet(__refs), _M_data(__cache) { #if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)) _M_name_timepunct = _S_c_name; @@ -48,7 +58,7 @@ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s __attribute__ ((__unused__)), size_t __refs) - : locale::facet(__refs) + : facet(__refs), _M_data(NULL) { #if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)) _M_name_timepunct = new char[strlen(__s) + 1]; @@ -64,5 +74,6 @@ if (_S_c_name != _M_name_timepunct) delete [] _M_name_timepunct; #endif + delete _M_data; _S_destroy_c_locale(_M_c_locale_timepunct); } |