Skip to content

Commit

Permalink
Enable consteval for Xcode 14.0.1 and later (#3331)
Browse files Browse the repository at this point in the history
Co-authored-by: Cloyce D. Spradling <[email protected]>
  • Loading branch information
cloyce and Cloyce D. Spradling authored Mar 4, 2023
1 parent e0748e6 commit 3daf338
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions include/fmt/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,13 @@
#endif

#ifndef FMT_CONSTEVAL
# if ((FMT_GCC_VERSION >= 1000 || FMT_CLANG_VERSION >= 1101) && \
FMT_CPLUSPLUS >= 202002L && !defined(__apple_build_version__)) || \
(defined(__cpp_consteval) && \
# if ((FMT_GCC_VERSION >= 1000 || FMT_CLANG_VERSION >= 1101) && \
(!defined(__apple_build_version__) || \
__apple_build_version__ >= 14000029L) && \
FMT_CPLUSPLUS >= 202002L) || \
(defined(__cpp_consteval) && \
(!FMT_MSC_VERSION || _MSC_FULL_VER >= 193030704))
// consteval is broken in MSVC before VS2022 and Apple clang 13.
// consteval is broken in MSVC before VS2022 and Apple clang before 14.
# define FMT_CONSTEVAL consteval
# define FMT_HAS_CONSTEVAL
# else
Expand Down

0 comments on commit 3daf338

Please sign in to comment.