Commit 0cd0fb9 1 parent d1a6e56 commit 0cd0fb9 Copy full SHA for 0cd0fb9
File tree 1 file changed +18
-5
lines changed
1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change 44
44
#endif
45
45
46
46
// Check if constexpr std::char_traits<>::compare,length is supported.
47
- // libstdc++: present on GCC 7 and newer and __cplusplus >= 201703L
48
- // MSVC, libc++: always if __cplusplus >= 201703L
47
+ //
48
+ // libstdc++: GCC 7 and newer and __cplusplus >= 201703L
49
+ // MSVC : VS 2017 15.7 and newer and /std:c++17
50
+ // https://docs.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance
51
+ // https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros
52
+ // libc++ : 4.0 and newer and if __cplusplus >= 201703L
53
+ // https://libcxx.llvm.org/docs/Cxx1zStatus.html
54
+ //
49
55
// NOTE: FMT_GCC_VERSION - is not libstdc++ version.
50
56
// _GLIBCXX_RELEASE - is present in GCC 7 libstdc++ and newer.
51
- #if __cplusplus >= 201703L || ( defined(_MSVC_LANG) && _MSVC_LANG >= 201703L )
52
- # ifndef __GLIBCXX__
57
+ #if defined(_MSC_VER )
58
+ # if _MSVC_LANG >= 201703L && _MSC_VER >= 1914
53
59
# define FMT_CONSTEXPR_CHAR_TRAITS constexpr
54
- # elif defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE >= 7
60
+ # endif
61
+ #elif defined(_LIBCPP_VERSION)
62
+ # if __cplusplus >= 201703L && _LIBCPP_VERSION >= 4000
63
+ # define FMT_CONSTEXPR_CHAR_TRAITS constexpr
64
+ # endif
65
+ #elif defined(__GLIBCXX__)
66
+ # if __cplusplus >= 201703L && defined(_GLIBCXX_RELEASE) && \
67
+ _GLIBCXX_RELEASE >= 7
55
68
# define FMT_CONSTEXPR_CHAR_TRAITS constexpr
56
69
# endif
57
70
#endif
You can’t perform that action at this time.
0 commit comments