messages private members
Gabriel Dos Reis
gdr@integrable-solutions.net
Fri Oct 3 09:36:00 GMT 2003
Pétur Runólfsson <peturr02@ru.is> writes:
| Gabriel Dos Reis wrote:
| > | >--- config/locale/gnu/messages_members.h 2 Oct 2003 21:12:46 -0000
| > | >***************
| > | >*** 39,45 ****
| > | > : facet(__refs)
| > | > {
| > | > #if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2))
| > | >! _M_name_messages = _S_c_name;
| > | > #endif
| > | > _M_c_locale_messages = _S_get_c_locale();
| > | > }
| > | >--- 39,45 ----
| > | > : facet(__refs)
| > | > {
| > | > #if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2))
| > | >! _M_name_messages = _S_get_c_name();
| > | > ^^
| > | >
| > | >needs "messages<_CharT>::" to become dependent (still better,
| > | >"locale::facet::"), or else error.
| [...]
| >
| > The reason the error does not appear in time_members.h is that
| > locale::facet is a NON-dependent base of __timepunct so usual name
| > lookup looks there and find it.
| > That is not the case for messages_byname<_CharT> which has the
| > dependent base class messages<_CharT>.
|
| This code is in messages<_CharT>, not messages_byname<_CharT>.
Right. The code in question is
template<typename _CharT>
messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
: messages<_CharT>(__refs)
{
#if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2))
if (this->_M_name_messages != _S_get_c_name())
delete [] this->_M_name_messages;
It is now corrected by Benjamin's commit.
-- Gaby
More information about the Libstdc++
mailing list