C++23 compatibility: basic_string_view cannot be constructed from nullptr

This commit is contained in:
Anders Dalvander 2024-02-09 10:08:46 +01:00
parent 3a6fb2fcaf
commit 29a5f34fe0

View File

@ -487,6 +487,8 @@ template <typename Char> class basic_string_view {
constexpr basic_string_view(const Char* s, size_t count) noexcept
: data_(s), size_(count) {}
constexpr basic_string_view(std::nullptr_t) = delete;
/**
Constructs a string reference object from a C string.
*/