49-string-view.patch 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. diff --git a/include/string_view b/include/string_view
  2. index 1a94ac0..07fcf44 100644
  3. --- a/include/string_view
  4. +++ b/include/string_view
  5. @@ -304,6 +304,9 @@ public:
  6. _LIBCPP_INLINE_VISIBILITY
  7. basic_string_view& operator=(const basic_string_view&) _NOEXCEPT = default;
  8. + _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
  9. + basic_string_view(nullptr_t, size_t) = delete;
  10. +
  11. _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
  12. basic_string_view(const _CharT* __s, size_type __len) _NOEXCEPT
  13. : __data_(__s), __size_(__len)
  14. @@ -348,7 +351,7 @@ public:
  15. basic_string_view(const _CharT* __s)
  16. : __data_(__s), __size_(_VSTD::__char_traits_length_checked<_Traits>(__s)) {}
  17. -#if _LIBCPP_STD_VER >= 23
  18. +#if _LIBCPP_STD_VER >= 20
  19. basic_string_view(nullptr_t) = delete;
  20. #endif
  21. @@ -734,7 +737,7 @@ public:
  22. { return ends_with(basic_string_view(__s)); }
  23. #endif
  24. -#if _LIBCPP_STD_VER >= 23
  25. +#if _LIBCPP_STD_VER >= 20
  26. constexpr _LIBCPP_INLINE_VISIBILITY
  27. bool contains(basic_string_view __sv) const noexcept
  28. { return find(__sv) != npos; }