diff --git a/include/nostd/string_view.h b/include/nostd/string_view.h index 0f42116..05af971 100644 --- a/include/nostd/string_view.h +++ b/include/nostd/string_view.h @@ -132,6 +132,16 @@ class LIBATFRAME_UTILS_API_HEAD_ONLY basic_string_view { // constexpr basic_string_view(const basic_string_view&) noexcept = default; // basic_string_view& operator=(const basic_string_view&) noexcept = default; + constexpr basic_string_view(const basic_string_view&) noexcept = default; + constexpr basic_string_view& operator=(const basic_string_view&) noexcept = default; + + constexpr basic_string_view& operator=(nostd::nonnull str) noexcept { + basic_string_view{str}.swap(*this); + return *this; + } + + constexpr basic_string_view& operator=(std::nullptr_t) noexcept = delete; + template constexpr basic_string_view& operator=(::std::basic_string&& str) noexcept { basic_string_view(str.data(), str.size()).swap(*this);