diff --git a/src/util/StringView.hxx b/src/util/StringView.hxx index 2e107dcbe..8b5064785 100644 --- a/src/util/StringView.hxx +++ b/src/util/StringView.hxx @@ -36,7 +36,7 @@ #include -#if !GCC_OLDER_THAN(7,0) +#if __cplusplus >= 201703L && !GCC_OLDER_THAN(7,0) #include #endif @@ -71,7 +71,7 @@ struct BasicStringView : ConstBuffer { constexpr BasicStringView(std::nullptr_t n) noexcept :ConstBuffer(n) {} -#if !GCC_OLDER_THAN(7,0) +#if __cplusplus >= 201703L && !GCC_OLDER_THAN(7,0) constexpr BasicStringView(std::basic_string_view src) noexcept :ConstBuffer(src.data(), src.size()) {}