相关疑难解决方法(0)

来自用户定义的文字的字符的整数序列,将字符串作为参数

目前,只有双打可以在用户定义的文字中生成字符模板:

template <char...> double operator "" _x();
// Later
1.3_x; // OK
"1.3"_y; // C++14 does not allow a _y user-
         // defined operator to parse that as a template of chars
Run Code Online (Sandbox Code Playgroud)

有没有一种聪明的方法来std::integer_sequence使用用户定义的文字生成字符.换句话说,代码是什么,_y(const char*, std::size_t)以便我最终得到一个std::integer_sequence<char, '1', '.', '3'>

c++ templates template-meta-programming user-defined-literals c++14

7
推荐指数
1
解决办法
410
查看次数