最近,在gcc-trunk中实现了"用户定义的文字".请告诉我,我是否正确理解我无法为可变参数字符模板定义"用户定义的文字"?
template<char... chars>
int operator"" _call() { return sizeof...(chars); }
...
std::cout << "method"_call;
Run Code Online (Sandbox Code Playgroud)
向上.
我不明白为什么允许这个表达式:
template<char... chars>
int operator"" _call() { return sizeof...(chars); }
...
std::cout << 12345566_call;
Run Code Online (Sandbox Code Playgroud)
这个是不允许的:
template<char... chars>
int operator"" _call() { return sizeof...(chars); }
...
std::cout << method_call;
Run Code Online (Sandbox Code Playgroud)
?
重点是什么?
向上. 这是因为含糊不清?
谢谢.