Browse Source

Update libc++ to 9b03c08e (6 Mar 2022).

Notable changes:
* don't warn that coroutines are not supported when using experimental/coroutine
* add _LIBCPP_HIDE_FROM_ABI to __quoted_proxy constructors
* ADL-proof calls of __quoted
* fix ctype facet `is` method for Windows
* change return type of bit_width to int (LWG3656)
* make private __wrap_iter constructors explicit
* fix delayed initialization of `__fill_` in basic_ios
* ranges::iter_move cleanup
* ADL-proof __synth_three_way
* reject random number generators with signed types
* use C++ overloads from math.h on AIX
* add explicit to some internal constructors
* replace _LIBCPP_HAS_NO_STRONG_ENUMS with C++ version check
* use `inline constexpr bool` instead of `constexpr bool` for helpers in ranges
* reject uniform_int_distribution<bool>, uniform_int_distribution<char> and all user types
* allow std::mergeable and std::sortable even with incomplete ranges
* fix double close bug in std::filesystem::remove_all
* remove recursion in basic_string::insert because it interferes with constexpr
* fix error checking of wctob_l calls
* pack _Flags class on AIX
* fix integer type in __estimate_column_width exposed by AIX
* qualify all std::move calls with std
* make chrono includes granular
* set std::numeric_limits::tinyness_before to true on ARM
* add ranges::in_found_result and ranges::min_max_result
halyavin 1 year ago
parent
commit
7fcf8b470c

+ 1 - 1
build/ymake.core.conf

@@ -9,7 +9,7 @@
 FAKEID=628318530716
 
 SANDBOX_FAKEID=${FAKEID}.7600000
-CPP_FAKEID=2023-09-22
+CPP_FAKEID=2023-09-23
 GO_FAKEID=11100371
 ANDROID_FAKEID=2023-05-17
 CLANG_TIDY_FAKEID=2023-06-06

+ 3 - 3
contrib/libs/cxxsupp/libcxx/include/__bit_reference

@@ -88,7 +88,7 @@ public:
         {return __bit_iterator<_Cp, false>(__seg_, static_cast<unsigned>(__libcpp_ctz(__mask_)));}
 private:
     _LIBCPP_INLINE_VISIBILITY
-    __bit_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT
+    explicit __bit_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT
         : __seg_(__s), __mask_(__m) {}
 };
 
@@ -164,7 +164,7 @@ public:
 private:
     _LIBCPP_INLINE_VISIBILITY
     _LIBCPP_CONSTEXPR
-    __bit_const_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT
+    explicit __bit_const_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT
         : __seg_(__s), __mask_(__m) {}
 
     __bit_const_reference& operator=(const __bit_const_reference&) = delete;
@@ -1250,7 +1250,7 @@ public:
 
 private:
     _LIBCPP_INLINE_VISIBILITY
-    __bit_iterator(__storage_pointer __s, unsigned __ctz) _NOEXCEPT
+    explicit __bit_iterator(__storage_pointer __s, unsigned __ctz) _NOEXCEPT
         : __seg_(__s), __ctz_(__ctz) {}
 
     friend typename _Cp::__self;

+ 1 - 1
contrib/libs/cxxsupp/libcxx/include/__compare/synth_three_way.h

@@ -42,7 +42,7 @@ _LIBCPP_HIDE_FROM_ABI inline constexpr auto __synth_three_way =
   };
 
 template <class _Tp, class _Up = _Tp>
-using __synth_three_way_result = decltype(__synth_three_way(declval<_Tp&>(), declval<_Up&>()));
+using __synth_three_way_result = decltype(std::__synth_three_way(declval<_Tp&>(), declval<_Up&>()));
 
 #endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
 

+ 11 - 7
contrib/libs/cxxsupp/libcxx/include/__config

@@ -514,10 +514,6 @@ typedef __char32_t char32_t;
 #  define _LIBCPP_NO_EXCEPTIONS
 #endif
 
-#if !(__has_feature(cxx_strong_enums))
-#define _LIBCPP_HAS_NO_STRONG_ENUMS
-#endif
-
 #if __has_feature(cxx_attributes)
 #  define _LIBCPP_NORETURN [[noreturn]]
 #else
@@ -924,7 +920,7 @@ typedef unsigned int   char32_t;
 # define _LIBCPP_USING_IF_EXISTS
 #endif
 
-#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS
+#ifdef _LIBCPP_CXX03_LANG
 #  define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_TYPE_VIS x { enum __lx
 #  define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \
      __lx __v_; \
@@ -932,10 +928,10 @@ typedef unsigned int   char32_t;
      _LIBCPP_INLINE_VISIBILITY explicit x(int __v) : __v_(static_cast<__lx>(__v)) {} \
      _LIBCPP_INLINE_VISIBILITY operator int() const {return __v_;} \
      };
-#else  // _LIBCPP_HAS_NO_STRONG_ENUMS
+#else  // _LIBCPP_CXX03_LANG
 #  define _LIBCPP_DECLARE_STRONG_ENUM(x) enum class _LIBCPP_ENUM_VIS x
 #  define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x)
-#endif // _LIBCPP_HAS_NO_STRONG_ENUMS
+#endif // _LIBCPP_CXX03_LANG
 
 // _LIBCPP_DEBUG potential values:
 //  - undefined: No assertions. This is the default.
@@ -1546,6 +1542,14 @@ extern "C" _LIBCPP_FUNC_VIS void __sanitizer_annotate_contiguous_container(
 #  define _LIBCPP_GCC_DIAGNOSTIC_IGNORED(str)
 #endif
 
+#if defined(_AIX) && !defined(_LIBCPP_COMPILER_GCC)
+#  define _LIBCPP_PACKED_BYTE_FOR_AIX _Pragma("pack(1)")
+#  define _LIBCPP_PACKED_BYTE_FOR_AIX_END _Pragma("pack(pop)")
+#else
+#  define _LIBCPP_PACKED_BYTE_FOR_AIX      /* empty */
+#  define _LIBCPP_PACKED_BYTE_FOR_AIX_END  /* empty */
+#endif
+
 #endif // __cplusplus
 
 #endif // _LIBCPP_CONFIG

+ 3 - 3
contrib/libs/cxxsupp/libcxx/include/__debug

@@ -66,7 +66,7 @@ struct _LIBCPP_TYPE_VIS __c_node
     __c_node& operator=(const __c_node&) = delete;
 
     _LIBCPP_INLINE_VISIBILITY
-    __c_node(void* __c, __c_node* __next)
+    explicit __c_node(void* __c, __c_node* __next)
         : __c_(__c), __next_(__next), beg_(nullptr), end_(nullptr), cap_(nullptr) {}
     virtual ~__c_node();
 
@@ -83,7 +83,7 @@ template <class _Cont>
 struct _C_node
     : public __c_node
 {
-    _C_node(void* __c, __c_node* __n)
+    explicit _C_node(void* __c, __c_node* __n)
         : __c_node(__c, __n) {}
 
     virtual bool __dereferenceable(const void*) const;
@@ -141,7 +141,7 @@ class _LIBCPP_TYPE_VIS __libcpp_db
     __i_node** __iend_;
     size_t   __isz_;
 
-    __libcpp_db();
+    explicit __libcpp_db();
 public:
     __libcpp_db(const __libcpp_db&) = delete;
     __libcpp_db& operator=(const __libcpp_db&) = delete;

+ 1 - 1
contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h

@@ -11,6 +11,7 @@
 #define _LIBCPP___FILESYSTEM_DIRECTORY_ENTRY_H
 
 #include <__availability>
+#include <__chrono/time_point.h>
 #include <__config>
 #include <__errc>
 #include <__filesystem/file_status.h>
@@ -21,7 +22,6 @@
 #include <__filesystem/path.h>
 #include <__filesystem/perms.h>
 #include <__utility/unreachable.h>
-#include <chrono>
 #include <cstdint>
 #include <cstdlib>
 #include <iosfwd>

+ 2 - 1
contrib/libs/cxxsupp/libcxx/include/__filesystem/file_time_type.h

@@ -11,8 +11,9 @@
 #define _LIBCPP___FILESYSTEM_FILE_TIME_TYPE_H
 
 #include <__availability>
+#include <__chrono/file_clock.h>
+#include <__chrono/time_point.h>
 #include <__config>
-#include <chrono>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header

+ 1 - 1
contrib/libs/cxxsupp/libcxx/include/__filesystem/operations.h

@@ -11,6 +11,7 @@
 #define _LIBCPP___FILESYSTEM_OPERATIONS_H
 
 #include <__availability>
+#include <__chrono/time_point.h>
 #include <__config>
 #include <__filesystem/copy_options.h>
 #include <__filesystem/file_status.h>
@@ -20,7 +21,6 @@
 #include <__filesystem/perm_options.h>
 #include <__filesystem/perms.h>
 #include <__filesystem/space_info.h>
-#include <chrono>
 #include <cstdint>
 #include <system_error>
 

+ 1 - 1
contrib/libs/cxxsupp/libcxx/include/__filesystem/path.h

@@ -968,7 +968,7 @@ public:
   _LIBCPP_INLINE_VISIBILITY friend basic_istream<_CharT, _Traits>&
   operator>>(basic_istream<_CharT, _Traits>& __is, path& __p) {
     basic_string<_CharT, _Traits> __tmp;
-    __is >> __quoted(__tmp);
+    __is >> _VSTD::__quoted(__tmp);
     __p = __tmp;
     return __is;
   }

+ 3 - 1
contrib/libs/cxxsupp/libcxx/include/__format/parser_std_format_spec.h

@@ -52,6 +52,7 @@ namespace __format_spec {
  * * The format-type filtering needs to be done post parsing in the parser
  *   derived from @ref __parser_std.
  */
+_LIBCPP_PACKED_BYTE_FOR_AIX
 class _LIBCPP_TYPE_VIS _Flags {
 public:
   enum class _LIBCPP_ENUM_VIS _Alignment : uint8_t {
@@ -109,6 +110,7 @@ public:
 
   _Type __type{_Type::__default};
 };
+_LIBCPP_PACKED_BYTE_FOR_AIX_END
 
 namespace __detail {
 template <class _CharT>
@@ -1271,7 +1273,7 @@ __estimate_column_width(const _CharT* __first, const _CharT* __last,
   size_t __result = 0;
 
   while (__first != __last) {
-    wchar_t __c = *__first;
+    uint32_t __c = *__first;
     __result += __column_width(__c);
 
     if (__result > __maximum)

Some files were not shown because too many files changed in this diff