int main(int argc, char **argv) {
static_assert(false, R"error(This is an error message. You need to
1. Pick up the phone.
2. Call GhostBusters.
3. Run and hide.
)error");
}
给为什么不用static_assert打印新行/其他控制序列?
error: static_assert failed "This is an error message. You need to\n\n1. Pick up the phone.\n2. Call GhostBusters.\n3. Run and hide.\n\n"
static_assert(false, err);
^ ~~~~~
1 error generated.
有谁知道这些都是 “转义” 的原因是什么?它是依赖于编译器/平台吗?标准的一部分?
嘎!好的,将在11分钟内接受x0谢谢! – sjm324