Gui*_*e07 13 c++ boost character boost-mpl
您好在boost mpl文档中我发现了mpl :: string和以下示例:
typedef mpl::string<'hell','o wo','rld'> hello;
Run Code Online (Sandbox Code Playgroud)
我有点惊讶,因为我认为在C或C++中我们不能在角色之间有多个角色'?
这是正常而有效的吗?
ybu*_*ill 11
是的,它是有效的C++.从任何现有的C++标准,[lex.conn]部分:
包含多个c-char的普通字符文字是多字符文字.多字符文字具有类型
int和实现定义的值.