Browse Source

Intermediate changes

robot-piglet 7 months ago
parent
commit
0dc3baade9

+ 2 - 1
contrib/libs/cxxsupp/libcxxmsvc/include/string

@@ -534,6 +534,7 @@ basic_string<char32_t> operator "" s( const char32_t *str, size_t len ); // C++1
 #include <initializer_list>
 #include <iosfwd>
 #include <iterator>
+#include <limits>
 #include <memory>
 #include <stdexcept>
 #include <string_view>
@@ -772,7 +773,7 @@ private:
 
 public:
     _LIBCPP_TEMPLATE_DATA_VIS
-    static const size_type npos = -1;
+    static const size_type npos = numeric_limits<size_type>::max();
 
     _LIBCPP_INLINE_VISIBILITY basic_string()
         _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value);

+ 1 - 1
contrib/libs/cxxsupp/libcxxmsvc/include/string_view

@@ -264,7 +264,7 @@ public:
     typedef const_reverse_iterator                     reverse_iterator;
     typedef size_t                                     size_type;
     typedef ptrdiff_t                                  difference_type;
-    static _LIBCPP_CONSTEXPR const size_type npos = -1; // size_type(-1);
+    static _LIBCPP_CONSTEXPR const size_type npos = numeric_limits<size_type>::max(); // size_type(-1);
 
     static_assert((!is_array<value_type>::value), "Character type of basic_string_view must not be an array");
     static_assert(( is_standard_layout<value_type>::value), "Character type of basic_string_view must be standard-layout");