util/StringView: enable string_view support only on C++17

This commit is contained in:
Max Kellermann 2019-09-24 15:16:07 +02:00 committed by Max Kellermann
parent 0643b5abad
commit c9590db188
1 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@
#include <utility>
#if !GCC_OLDER_THAN(7,0)
#if __cplusplus >= 201703L && !GCC_OLDER_THAN(7,0)
#include <string_view>
#endif
@ -71,7 +71,7 @@ struct BasicStringView : ConstBuffer<T> {
constexpr BasicStringView(std::nullptr_t n) noexcept
:ConstBuffer<T>(n) {}
#if !GCC_OLDER_THAN(7,0)
#if __cplusplus >= 201703L && !GCC_OLDER_THAN(7,0)
constexpr BasicStringView(std::basic_string_view<T> src) noexcept
:ConstBuffer<T>(src.data(), src.size()) {}