Title
Provide allocator for wstring_convert
Status
c++11
Section
[depr.conversions.string]
Submitter
P.J. Plauger

Created on 2009-03-03.00:00:00 last changed 154 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Change [conversions.string]:

template<class Codecvt, class Elem = wchar_t,
         class Wide_alloc = std::allocator<Elem>,
         class Byte_alloc = std::allocator<char> > class wstring_convert {
  public:
    typedef std::basic_string<char, char_traits<char>, Byte_alloc> byte_string;
    typedef std::basic_string<Elem, char_traits<Elem>, Wide_alloc> wide_string;
     ...

Change [conversions.string], p3:

-3- The class template describes an ob ject that controls conversions between wide string ob jects of class std::basic_string<Elem, char_traits<Elem>, Wide_alloc> and byte string objects of class std::basic_string<char, char_traits<char>, Byte_alloc> (also known as std::string).

Date: 2010-10-21.18:28:33

[ Batavia (2009-05): ]

We agree with the proposed resolution. Move to Tentatively Ready.

Date: 2012-10-21.13:19:07

Addresses JP-50 [CD1]

Add custom allocator parameter to wstring_convert, since we cannot allocate memory for strings from a custom allocator.

History
Date User Action Args
2011-08-23 20:07:26adminsetstatus: wp -> c++11
2010-10-21 18:28:33adminsetmessages: + msg4710
2010-10-21 18:28:33adminsetmessages: + msg4709
2009-03-03 00:00:00admincreate