libstdc++-v3/ChangeLog:
* include/std/version (__cpp_lib_format): Define.
* testsuite/std/format/functions/format.cc: Check it.
#define __cpp_lib_constexpr_utility 201811L
#define __cpp_lib_constexpr_vector 201907L
#define __cpp_lib_erase_if 202002L
+#define __cpp_lib_format 202106L
#define __cpp_lib_generic_unordered_lookup 201811L
#define __cpp_lib_interpolate 201902L
#ifdef _GLIBCXX_HAS_GTHREADS
// { dg-do run { target c++20 } }
#include <format>
+
+#ifndef __cpp_lib_format
+# error "Feature test macro for std::format is missing in <format>"
+#elif __cpp_lib_format < 202106L
+# error "Feature test macro for std::format has wrong value in <format>"
+#endif
+
+#undef __cpp_lib_format
+#include <version>
+#ifndef __cpp_lib_format
+# error "Feature test macro for std::format is missing in <version>"
+#elif __cpp_lib_format < 202106L
+# error "Feature test macro for std::format has wrong value in <version>"
+#endif
+
#include <string>
#include <limits>
#include <cstdint>