How to use the <format> header
问题 In a related question (" std::string formatting like sprintf ") I learned about this awesome new C++20 header <format>. However, there seems to be no supporting compiler. Is this correct or is there a way to use it anyway? I'm using g++ 9.3 with the -std=c++2a flag and the library <format> is not recognised. #include <format> // fatal error: format: No such file or directory #include <iostream> int main(){ std::cout << std::format("Hello {}!", "World"); } g++-9 test.cpp -o test -std=c++2a 回答1