Mau*_*uiz 4 c++ string parsing compilation-time
我的C++代码中有一些带有绑定的SQL查询,这些查询是static const std::string,因为这些查询很复杂,所以很容易出错.我想在编译时做一些非常基本的检查,例如计算逗号或:字符的数量.
static const std::string
:
Seb*_*edl 5
你不能.A static const std::string在编译时不存在.
字符串文字可以使用constexpr函数,但不能使用std::string对象.
constexpr
std::string
归档时间:
7 年,4 月 前
查看次数:
436 次
最近记录: