Commit c9590db1 authored by Max Kellermann's avatar Max Kellermann Committed by Max Kellermann

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

parent 0643b5ab
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include <utility> #include <utility>
#if !GCC_OLDER_THAN(7,0) #if __cplusplus >= 201703L && !GCC_OLDER_THAN(7,0)
#include <string_view> #include <string_view>
#endif #endif
...@@ -71,7 +71,7 @@ struct BasicStringView : ConstBuffer<T> { ...@@ -71,7 +71,7 @@ struct BasicStringView : ConstBuffer<T> {
constexpr BasicStringView(std::nullptr_t n) noexcept constexpr BasicStringView(std::nullptr_t n) noexcept
:ConstBuffer<T>(n) {} :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 constexpr BasicStringView(std::basic_string_view<T> src) noexcept
:ConstBuffer<T>(src.data(), src.size()) {} :ConstBuffer<T>(src.data(), src.size()) {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment