c++boostc++11unicodeboost-locale

Boost Locale boundary analysis doesn't work with char16_t


I'm trying to use boost::locale::boundary::segmant_index to analyse boundaries in a string consisting of char16_t symbols. But the following error occurs during compilation (Boost 1.54, GCC 4.8.1):

invalid use of incomplete type 'const class boost::locale::boundary::boundary_indexing<char16_t>

UPD: here's the example

#include <string>
#include <boost/locale.hpp>

int main() {
    std::basic_string<char16_t> s;
    boost::locale::boundary::segment_index<std::basic_string<char16_t>::iterator> m(boost::locale::boundary::word, s.begin(), s.end());
}

Solution

  • GCC's support of char16_t/char32_t is broken. See http://www.boost.org/doc/libs/1_54_0/libs/locale/doc/html/status_of_cpp0x_characters_support.html