How to use C++20 in CMake project

According to the C++ compiler support page (archive) on cppreference, C++20 <format> functionalities are supported by

  • GCC libstdc++ 13;

  • MSVC STL 19.29 (Visual Studio 2019 16.10); and

  • Clang libc++ 14 (partial support)

as of December 2022. You will be able to use #include <format> normally after upgrading to these versions.

If upgrading is not an option for one reason or another, you can still use the {fmt} library, which was the basis for the standardization of the C++20 <format> library. There are minimal differences between C++20 <format> and the {fmt} library.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)