sma*_*llB 11 c++ compiler-errors constexpr c++11
为什么不编译:作为返回类型
会出现问题string吗?
constexpr std::string fnc()
{
return std::string("Yaba");
}
Run Code Online (Sandbox Code Playgroud)
R. *_*des 14
它的构造函数std::string指向char的不是constexpr.在constexpr函数中,您只能使用函数constexpr.
| 归档时间: |
|
| 查看次数: |
1732 次 |
| 最近记录: |