Questions tagged «char8-t»

1
-fno-char8_t的MSVC等效项是什么?
在C ++ 20中,u8字符串文字是基于char8_t类型的。它们故意不再转换为char const*: const char* str = u8"Hall\u00f6chen \u2603"; // no longer valid in C++20 当然,迁移到C ++ 20时的最终目标是完全采用新行为(在上面的示例中:更改的类型str)。但是,由于有第三方库,因此通常无法立即实现。 引入和“补救” 的建议char8_t预期并提到在clang和gcc中有一个-fno-char8_t标志可以切换回旧的行为(同时仍然可以享受其他C ++ 20功能)。 第二个建议设置了微软将遵循并添加类似标志的期望,但是我无法找到如何设置它(至少在VS 2019版本16.4中)。 那么有人知道MSVC的含义-fno-char8_t是什么吗?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.