From ee799d6fdbef61975e471a14228ba5b0e69cf72e Mon Sep 17 00:00:00 2001 From: ThePhD Date: Fri, 15 Dec 2023 00:39:27 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=20Heavily=20guard=20existing=20FMT?= =?UTF-8?q?=5FOUTPUT=5FRANGES=20for=20terrible=20compilers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/fmt/core.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index a850c1c6..c58a892c 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -144,7 +144,11 @@ // Only on if we know we can do the begin/end range checking properly, // that we have `if constexpr`, and that we have a std::ranges::subrange type #ifndef FMT_OUTPUT_RANGES -# if FMT_RANGE_CHECKS && defined(__cpp_if_constexpr) && defined( __cpp_lib_ranges) +# if FMT_RANGE_CHECKS \ + && defined(__cpp_if_constexpr) && (__cpp_if_constexpr >= 201606L)\ + && defined(__cpp_lib_ranges) && (__cpp_lib_ranges >= 201911L )\ + && defined(__cpp_concepts) && (__cpp_concepts >= 202002L) \ + && defined(__cpp_lib_concepts) && (__cpp_lib_concepts >= 201907L) # define FMT_OUTPUT_RANGES 1 # else # define FMT_OUTPUT_RANGES 0