Title
wstring_convert inconsistensies
Status
nad
Section
[depr.conversions.string]
Submitter
Bo Persson

Created on 2007-08-27.00:00:00 last changed 171 months ago

Messages

Date: 2010-10-21.18:28:33

[ 2009-07 Frankfurt: ]

codecvt isn't intended for beginning programmers. This is a regrettable consequence of the original design of the facet.

Move to NAD.

Date: 2010-10-21.18:28:33

[ San Francisco: ]

Bill will propose a resolution.

Date: 2007-08-27.00:00:00

Paragraph 3 says that the Codecvt template parameter shall meet the requirements of std::codecvt, even though std::codecvt itself cannot be used (because of a protected destructor).

How are we going to explain this code to beginning programmers?

template<class I, class E, class S>
struct codecvt : std::codecvt<I, E, S>
{
    ~codecvt()
    { }
};

void main()
{
    std::wstring_convert<codecvt<wchar_t, char, std::mbstate_t> > compiles_ok;
    
    std::wstring_convert<std::codecvt<wchar_t, char, std::mbstate_t> >   not_ok;
}
History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg3543
2010-10-21 18:28:33adminsetmessages: + msg3542
2007-08-27 00:00:00admincreate