mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-31 03:07:36 +02:00
Remove redundant comments and put common case check first
This commit is contained in:
@ -45,27 +45,17 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Check if constexpr std::char_traits<>::compare,length is supported.
|
// Check if constexpr std::char_traits<>::compare,length is supported.
|
||||||
//
|
#if defined(__GLIBCXX__)
|
||||||
// libstdc++: GCC 7 and newer and __cplusplus >= 201703L
|
# if __cplusplus >= 201703L && defined(_GLIBCXX_RELEASE) && \
|
||||||
// MSVC : VS 2017 15.7 and newer and /std:c++17
|
_GLIBCXX_RELEASE >= 7 // GCC 7+ libstdc++ has _GLIBCXX_RELEASE.
|
||||||
// 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
|
|
||||||
# define FMT_CONSTEXPR_CHAR_TRAITS constexpr
|
# define FMT_CONSTEXPR_CHAR_TRAITS constexpr
|
||||||
# endif
|
# endif
|
||||||
#elif defined(_LIBCPP_VERSION)
|
#elif defined(_LIBCPP_VERSION)
|
||||||
# if __cplusplus >= 201703L && _LIBCPP_VERSION >= 4000
|
# if __cplusplus >= 201703L && _LIBCPP_VERSION >= 4000
|
||||||
# define FMT_CONSTEXPR_CHAR_TRAITS constexpr
|
# define FMT_CONSTEXPR_CHAR_TRAITS constexpr
|
||||||
# endif
|
# endif
|
||||||
#elif defined(__GLIBCXX__)
|
#elif defined(_MSC_VER)
|
||||||
# if __cplusplus >= 201703L && defined(_GLIBCXX_RELEASE) && \
|
# if _MSVC_LANG >= 201703L && _MSC_VER >= 1914
|
||||||
_GLIBCXX_RELEASE >= 7
|
|
||||||
# define FMT_CONSTEXPR_CHAR_TRAITS constexpr
|
# define FMT_CONSTEXPR_CHAR_TRAITS constexpr
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user