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