Fix finding string_view on libstdc++ <= c++14
This commit is contained in:
parent
6cccdc24bc
commit
59010a4470
@ -227,10 +227,11 @@
|
|||||||
|
|
||||||
// libc++ supports string_view in pre-c++17.
|
// libc++ supports string_view in pre-c++17.
|
||||||
#if (FMT_HAS_INCLUDE(<string_view>) && \
|
#if (FMT_HAS_INCLUDE(<string_view>) && \
|
||||||
(__cplusplus > 201402L || defined(_LIBCPP_VERSION))) || \
|
(__cplusplus > 201703L || (__cplusplus > 201402L && defined(_LIBCPP_VERSION)))) || \
|
||||||
(defined(_MSVC_LANG) && _MSVC_LANG > 201402L && _MSC_VER >= 1910)
|
(defined(_MSVC_LANG) && _MSVC_LANG > 201402L && _MSC_VER >= 1910)
|
||||||
# include <string_view>
|
# include <string_view>
|
||||||
# define FMT_USE_STRING_VIEW
|
# define FMT_USE_STRING_VIEW
|
||||||
|
// libstdc++ supports experimental/string_view in c++14
|
||||||
#elif FMT_HAS_INCLUDE("experimental/string_view") && __cplusplus >= 201402L
|
#elif FMT_HAS_INCLUDE("experimental/string_view") && __cplusplus >= 201402L
|
||||||
# include <experimental/string_view>
|
# include <experimental/string_view>
|
||||||
# define FMT_USE_EXPERIMENTAL_STRING_VIEW
|
# define FMT_USE_EXPERIMENTAL_STRING_VIEW
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user