Opened 10 years ago

Closed 10 years ago

#8369 closed Tasks (fixed)

Do not compile even trivial UTF16 and UTF32 tests with libc++

Reported by: Antony Polukhin Owned by: Antony Polukhin
Milestone: Boost 1.54.0 Component: lexical_cast
Version: Boost 1.52.0 Severity: Cosmetic
Keywords: char16_t char32_t unicode utf16 utf32 libc++ clang Cc:

Description

In libc++ there are no specializations of std::numpunct<char16_t> and std::numpunct<char32_t> templates. So no test shall be run with char16_t and char32_t types on libc++.

Change History (4)

comment:1 by Marshall Clow, 10 years ago

Additional information:

The C++ standard (I looked at n3216) specifies (in 22.3.1.1.1) that numpunct<char> and numpunct<wchar_t> are required, and does not mention numpunct<char16_t> or numpunct<char32_t> at all.

gcc (I checked version 4.8) provides a completely templated implementation of std::numpunct, so it supports specializing on any character type. libc++ provides two implementations: one for char and the other for wchar_t.

comment:2 by Antony Polukhin, 10 years ago

(In [83717]) Disable UTF16 and UTF32 tests for libc++ (refs #8369)

comment:3 by Antony Polukhin, 10 years ago

Replying to marshall:

Additional information:

The C++ standard (I looked at n3216) specifies (in 22.3.1.1.1) that numpunct<char> and numpunct<wchar_t> are required, and does not mention numpunct<char16_t> or numpunct<char32_t> at all.

Yes, they are not required, which makes a lot of troubles when std::basic_istream and std::basic_ostream classes are used with those character types as template parameters (users miss this functionality, see 1, 2).

gcc (I checked version 4.8) provides a completely templated implementation of std::numpunct, so it supports specializing on any character type. libc++ provides two implementations: one for char and the other for wchar_t.

GCC-4.7 was also providing a fully templated version. Unfortunately, some support from glibc was required, so usage of std::numpunct<char16_t> was leading to segmentation faults (though have not checked it for a year, may be things changed).

comment:4 by Antony Polukhin, 10 years ago

Resolution: fixed
Status: newclosed

(In [83764]) Mrege from trunk:

  • Disable UTF16 and UTF32 tests for libc++ (fixes #8369)
Note: See TracTickets for help on using tickets.