Topic: Wrong typedefs in wstring_convert?
Author: Daniel Vogelbacher <daniel@vogelbacher.name>
Date: Sun, 24 Jan 2010 00:47:34 CST Raw View
Hi,
the current draft n3000 defines wstring_convert (22.3.3.2.2 - 2) with
two types (byte_string and wide_string):
namespace std {
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<char>, Wide_alloc> wide_string;
Is the second one correct? I think it should be
typedef std::basic_string<Elem, char_traits<Elem>, Wide_alloc> wide_string;
Regards,
Daniel Vogelbacher
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Author: =?ISO-8859-1?Q?Daniel_Kr=FCgler?= <daniel.kruegler@googlemail.com>
Date: Sun, 24 Jan 2010 10:42:58 CST Raw View
On 24 Jan., 07:47, Daniel Vogelbacher <dan...@vogelbacher.name> wrote:
> Hi,
>
> the current draft n3000 defines wstring_convert (22.3.3.2.2 - 2) with
> two types (byte_string and wide_string):
>
> namespace std {
> 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<char>, Wide_alloc> wide_string;
>
> Is the second one correct? I think it should be
>
> typedef std::basic_string<Elem, char_traits<Elem>, Wide_alloc> wide_string;
>
The latter is correct. The problem is an editorial oversight, because
the intended change is documented in:
http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#991
Greetings from Bremen,
Daniel Kr gler
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]