<format> 标头未找到 (C++)

Hel*_*mer 5 c++ c++20

我想使用新的 C++20<format>头文件。但是当我尝试#include它时,它显然不存在于我当前的 stdlib 中。

我尝试使用 clang++ 和 g++,但它们都不起作用。

是的,我tasks.json在 VSCode的文件中将C++ 标准指定为“c++2a” 。

我究竟做错了什么?

for*_*818 11

您可以在此处查看编译器支持概述:https : //en.cppreference.com/w/cpp/compiler_support

According to the table, up to today (May 13 '20 at 8:07) no compiler supports P0645R10: Text formatting.

The overview specifically for MSVS can be found here: https://docs.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=vs-2019 (though I didn't find <format> on their list).

  • @Hellstormer“或者说它为什么存在?” 我不明白..存在的是指定标头应包含的内容的标准,这与准备好使用它不同 (3认同)