【发布时间】:2013-11-18 20:50:53
【问题描述】:
我正在尝试使用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());
}
【问题讨论】:
-
您是否加入了
<boost/locale/boundary/facets.hpp>? -
我试过包含它,这没有帮助。
标签: c++ boost c++11 unicode boost-locale