我正在尝试使用 boost::locale::boundary::segmant_index
来分析由 char16_t
符号组成的字符串中的边界。但是编译时出现如下错误(Boost 1.54,GCC 4.8.1):
invalid use of incomplete type 'const class boost::locale::boundary::boundary_indexing<char16_t>
UPD:这是例子
#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());
}
最佳答案
GCC 对 char16_t/char32_t 的支持被破坏了。参见 http://www.boost.org/doc/libs/1_54_0/libs/locale/doc/html/status_of_cpp0x_characters_support.html
关于c++ - Boost Locale 边界分析不适用于 char16_t,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19832048/