I want to use the <format>
header available in C++20.
I am using the most up-to-date release of CMake.
My CMakeFiles looks like
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_BUILD_TYPE debug)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20")
I am using Clang 9 as my compiler.
However, I am getting the following error when including <format>
:
fatal error: 'format' file not found
#include <format>
I have also used the flag -std=c++2a
, with no effect.
How can I use C++20 <format>
?