From 4fea018b2d3de314120a79e638499319f183429b Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Mon, 26 Mar 2018 07:00:41 -1000 Subject: [PATCH] Fix string_view detection --- include/fmt/core.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index f519b5d9..fd53cfbe 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -155,9 +155,10 @@ Type(const Type &) FMT_DELETED; \ void operator=(const Type &) FMT_DELETED -#if (FMT_HAS_INCLUDE() && __cplusplus > 201402L) || \ - (defined(_MSVC_LANG) && _MSVC_LANG > 201402L && _MSC_VER >= 1910) || \ - _LIBCPP_VERSION // libc++ supports string_view in pre-c++17 +// libc++ supports string_view in pre-c++17. +#if (FMT_HAS_INCLUDE() && \ + (__cplusplus > 201402L || _LIBCPP_VERSION)) || \ + (defined(_MSVC_LANG) && _MSVC_LANG > 201402L && _MSC_VER >= 1910) # include # define FMT_USE_STD_STRING_VIEW // std::experimental::basic_string_view::remove_prefix isn't constexpr until