messages_members.cc: Add specialization for messages<wchar_t>.

* config/locale/generic/messages_members.cc: Add specialization for
	messages<wchar_t>.
	* config/locale/ieee_1003.1-20021/messages_members.cc: Likewise.

From-SVN: r56920
This commit is contained in:
Jakub Jelinek 2002-09-07 21:06:57 +02:00 committed by Jakub Jelinek
parent 3a357ad127
commit 7d9857fde0
3 changed files with 25 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2002-09-07 Jakub Jelinek <jakub@redhat.com>
* config/locale/generic/messages_members.cc: Add specialization for
messages<wchar_t>.
* config/locale/ieee_1003.1-20021/messages_members.cc: Likewise.
2002-09-06 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/localefwd.h: Tweak formatting.

View File

@ -42,4 +42,11 @@ namespace std
string
messages<char>::do_get(catalog, int, int, const string& __dfault) const
{ return __dfault; }
#ifdef _GLIBCPP_USE_WCHAR_T
template<>
wstring
messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
{ return __dfault; }
#endif
}

View File

@ -46,4 +46,16 @@ namespace std
nl_catd __nlc = reinterpret_cast<nl_catd>(__c);
return string(catgets(__nlc, __setid, __msgid, __dfault.c_str()));
}
#ifdef _GLIBCPP_USE_WCHAR_T
template<>
wstring
messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
{
nl_catd __nlc = reinterpret_cast<nl_catd>(__c);
char* __msg = catgets(__nlc, __setid, __msgid,
_M_convert_to_char(__dfault));
return _M_convert_from_char(__msg);
}
#endif
}