mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-19 20:18:49 +00:00
Remove redundant comments and put common case check first
This commit is contained in:
parent
2665afb515
commit
84feeb0f36
@ -45,27 +45,17 @@
|
||||
#endif
|
||||
|
||||
// Check if constexpr std::char_traits<>::compare,length is supported.
|
||||
//
|
||||
// libstdc++: GCC 7 and newer and __cplusplus >= 201703L
|
||||
// MSVC : VS 2017 15.7 and newer and /std:c++17
|
||||
// https://docs.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance
|
||||
// https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros
|
||||
// libc++ : 4.0 and newer and if __cplusplus >= 201703L
|
||||
// https://libcxx.llvm.org/docs/Cxx1zStatus.html
|
||||
//
|
||||
// NOTE: FMT_GCC_VERSION - is not libstdc++ version.
|
||||
// _GLIBCXX_RELEASE - is present in GCC 7 libstdc++ and newer.
|
||||
#if defined(_MSC_VER)
|
||||
# if _MSVC_LANG >= 201703L && _MSC_VER >= 1914
|
||||
#if defined(__GLIBCXX__)
|
||||
# if __cplusplus >= 201703L && defined(_GLIBCXX_RELEASE) && \
|
||||
_GLIBCXX_RELEASE >= 7 // GCC 7+ libstdc++ has _GLIBCXX_RELEASE.
|
||||
# define FMT_CONSTEXPR_CHAR_TRAITS constexpr
|
||||
# endif
|
||||
#elif defined(_LIBCPP_VERSION)
|
||||
# if __cplusplus >= 201703L && _LIBCPP_VERSION >= 4000
|
||||
# define FMT_CONSTEXPR_CHAR_TRAITS constexpr
|
||||
# endif
|
||||
#elif defined(__GLIBCXX__)
|
||||
# if __cplusplus >= 201703L && defined(_GLIBCXX_RELEASE) && \
|
||||
_GLIBCXX_RELEASE >= 7
|
||||
#elif defined(_MSC_VER)
|
||||
# if _MSVC_LANG >= 201703L && _MSC_VER >= 1914
|
||||
# define FMT_CONSTEXPR_CHAR_TRAITS constexpr
|
||||
# endif
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user