diff options
author | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-20 08:30:01 +0000 |
---|---|---|
committer | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-20 08:30:01 +0000 |
commit | 88825d882818d439e1fcc53095749b1fb839573a (patch) | |
tree | 2a5dcdc28c5a07e9a96570184d62aa77b9a7b0f0 /libstdc++-v3/src/localename.cc | |
parent | c6d7113cdcd4eaf0b3cbdd0a3b949c3d51361052 (diff) | |
download | gcc-88825d882818d439e1fcc53095749b1fb839573a.tar.gz |
2001-09-19 Benjamin Kosnik <bkoz@redhat.com>
Implement std::time_put.
* include/bits/locale_facets.h: Include time_members.h.
(__timepunct): New.
(time_put): Implement.
* include/bits/locale_facets.tcc (do_put): Put generic versions here.
* include/bits/localefwd.h: Bump number of facets.
* config/locale/time_members_generic.h: New file.
* config/locale/time_members_gnu.h: New file.
* config/locale/c_locale_generic.h: Include clocale.
* src/locale-inst.cc: Add use_facet instantiations for __timepunct.
* src/locale.cc: Add __timepunct initializations.
* src/localename.cc (locale::_Impl::_Impl(string, size_t)): Same.
* include/Makefile.am (stamp-target): Add time_members.h.
* include/Makefile.in: Regenerate.
* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add CTIME_H.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* testsuite/22_locale/time_put.cc: New file.
* testsuite/22_locale/time_put_members_char.cc: New file.
* docs/html/22_locale/locale.html: Add note.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45702 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/src/localename.cc')
-rw-r--r-- | libstdc++-v3/src/localename.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libstdc++-v3/src/localename.cc b/libstdc++-v3/src/localename.cc index f921c2f19a2..738acdef203 100644 --- a/libstdc++-v3/src/localename.cc +++ b/libstdc++-v3/src/localename.cc @@ -90,8 +90,7 @@ namespace std _M_names[i] = __str; // Construct all standard facets and add them to _M_facets. - // XXX Eventually, all should use __clocale ctor like numpunct - // XXX how to deal cleanly, consistently with null ("C") __cloc? + // XXX How to deal cleanly, consistently with null ("C") __cloc? _M_init_facet(new std::collate<char>(__cloc)); _M_init_facet(new std::ctype<char>); _M_init_facet(new codecvt<char, char, mbstate_t>); @@ -102,6 +101,7 @@ namespace std _M_init_facet(new numpunct<char>(__cloc)); _M_init_facet(new num_get<char>); _M_init_facet(new num_put<char>); + _M_init_facet(new __timepunct<char>(__cloc, __str.c_str())); _M_init_facet(new time_get<char>); _M_init_facet(new time_put<char>); _M_init_facet(new std::messages<char>(__cloc, __str.c_str())); @@ -117,6 +117,7 @@ namespace std _M_init_facet(new numpunct<wchar_t>(__cloc)); _M_init_facet(new num_get<wchar_t>); _M_init_facet(new num_put<wchar_t>); + _M_init_facet(new __timepunct<wchar_t>(__cloc, __str.c_str())); _M_init_facet(new time_get<wchar_t>); _M_init_facet(new time_put<wchar_t>); _M_init_facet(new std::messages<wchar_t>(__cloc, __str.c_str())); |