From 7478420f8e3028694bc503f2024fef4d2e65559d Mon Sep 17 00:00:00 2001 From: Daniela Engert Date: Sat, 23 Oct 2021 15:26:11 +0200 Subject: [PATCH] Enable `consteval` for msvc 17.0-pre5 --- include/fmt/core.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index 2061161ef59f..8e8d2f1ce443 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -258,8 +258,8 @@ #ifndef FMT_CONSTEVAL # if ((FMT_GCC_VERSION >= 1000 || FMT_CLANG_VERSION >= 1101) && \ __cplusplus > 201703L && !defined(__apple_build_version__)) || \ - (defined(__cpp_consteval) && \ - !FMT_MSC_VER) // consteval is broken in MSVC and Apple clang 13. + (defined(__cpp_consteval) && (!FMT_MSC_VER || _MSC_FULL_VER >= 193030704)) + // consteval is broken in MSVC before VS2022 and Apple clang 13. # define FMT_CONSTEVAL consteval # define FMT_HAS_CONSTEVAL # else