为什么不编译:
可能有问题吗? string
作为回归类型?
constexpr std::string fnc()
{
return std::string("Yaba");
}
为什么不编译:
可能有问题吗? string
作为回归类型?
constexpr std::string fnc()
{
return std::string("Yaba");
}
的构造函数 std::string
带指针 char
不是 constexpr
。在 constexpr
函数只能使用函数 constexpr
。
的构造函数 std::string
带指针 char
不是 constexpr
。在 constexpr
函数只能使用函数 constexpr
。