Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为什么不编译: a作为返回类型 会不会有问题?string
string
constexpr std::string fnc() { return std::string("Yaba"); }
它的构造函数std::string需要一个指向charis not的指针constexpr。在constexpr函数中,您只能使用constexpr.
std::string
char
constexpr