diff options
| author | halyavin <[email protected]> | 2023-09-26 11:14:38 +0300 | 
|---|---|---|
| committer | halyavin <[email protected]> | 2023-09-26 11:42:52 +0300 | 
| commit | 7fcf8b470c7f4b97acf6f2833afa770c1372f231 (patch) | |
| tree | c7583ae7054d92eb5788c03760b6b9c50f7cc6c6 /contrib/libs/cxxsupp/libcxx/src | |
| parent | 4c226ec97b09cd6fc38f8a0bbe57f52d384abe3f (diff) | |
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
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/src')
3 files changed, 14 insertions, 12 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/src/filesystem/directory_iterator.cpp b/contrib/libs/cxxsupp/libcxx/src/filesystem/directory_iterator.cpp index 8b91929df87..8d069cc080d 100644 --- a/contrib/libs/cxxsupp/libcxx/src/filesystem/directory_iterator.cpp +++ b/contrib/libs/cxxsupp/libcxx/src/filesystem/directory_iterator.cpp @@ -25,8 +25,8 @@ public:    __dir_stream& operator=(const __dir_stream&) = delete;    __dir_stream(__dir_stream&& __ds) noexcept : __stream_(__ds.__stream_), -                                               __root_(move(__ds.__root_)), -                                               __entry_(move(__ds.__entry_)) { +                                               __root_(std::move(__ds.__root_)), +                                               __entry_(std::move(__ds.__entry_)) {      __ds.__stream_ = INVALID_HANDLE_VALUE;    } @@ -104,8 +104,8 @@ public:    __dir_stream& operator=(const __dir_stream&) = delete;    __dir_stream(__dir_stream&& other) noexcept : __stream_(other.__stream_), -                                                __root_(move(other.__root_)), -                                                __entry_(move(other.__entry_)) { +                                                __root_(std::move(other.__root_)), +                                                __entry_(std::move(other.__entry_)) {      other.__stream_ = nullptr;    } @@ -187,7 +187,7 @@ directory_iterator& directory_iterator::__increment(error_code* ec) {    error_code m_ec;    if (!__imp_->advance(m_ec)) { -    path root = move(__imp_->__root_); +    path root = std::move(__imp_->__root_);      __imp_.reset();      if (m_ec)        err.report(m_ec, "at root " PATH_CSTR_FMT, root.c_str()); @@ -221,7 +221,7 @@ recursive_directory_iterator::recursive_directory_iterator(    __imp_ = make_shared<__shared_imp>();    __imp_->__options_ = opt; -  __imp_->__stack_.push(move(new_s)); +  __imp_->__stack_.push(std::move(new_s));  }  void recursive_directory_iterator::__pop(error_code* ec) { @@ -275,7 +275,7 @@ void recursive_directory_iterator::__advance(error_code* ec) {    }    if (m_ec) { -    path root = move(stack.top().__root_); +    path root = std::move(stack.top().__root_);      __imp_.reset();      err.report(m_ec, "at root " PATH_CSTR_FMT, root.c_str());    } else { @@ -309,7 +309,7 @@ bool recursive_directory_iterator::__try_recursion(error_code* ec) {    if (!skip_rec) {      __dir_stream new_it(curr_it.__entry_.path(), __imp_->__options_, m_ec);      if (new_it.good()) { -      __imp_->__stack_.push(move(new_it)); +      __imp_->__stack_.push(std::move(new_it));        return true;      }    } @@ -320,7 +320,7 @@ bool recursive_directory_iterator::__try_recursion(error_code* ec) {        if (ec)          ec->clear();      } else { -      path at_ent = move(curr_it.__entry_.__p_); +      path at_ent = std::move(curr_it.__entry_.__p_);        __imp_.reset();        err.report(m_ec, "attempting recursion into " PATH_CSTR_FMT,                   at_ent.c_str()); diff --git a/contrib/libs/cxxsupp/libcxx/src/filesystem/operations.cpp b/contrib/libs/cxxsupp/libcxx/src/filesystem/operations.cpp index 9e0abc83b10..82d321942a6 100644 --- a/contrib/libs/cxxsupp/libcxx/src/filesystem/operations.cpp +++ b/contrib/libs/cxxsupp/libcxx/src/filesystem/operations.cpp @@ -1420,12 +1420,14 @@ uintmax_t remove_all_impl(int parent_directory, const path& p, error_code& ec) {    if (fd != -1) {      // If that worked, iterate over the contents of the directory and      // remove everything in it, recursively. -    scope_exit close_fd([=] { ::close(fd); });      DIR* stream = ::fdopendir(fd);      if (stream == nullptr) { +      ::close(fd);        ec = detail::capture_errno();        return 0;      } +    // Note: `::closedir` will also close the associated file descriptor, so +    // there should be no call to `close(fd)`.      scope_exit close_stream([=] { ::closedir(stream); });      uintmax_t count = 0; diff --git a/contrib/libs/cxxsupp/libcxx/src/locale.cpp b/contrib/libs/cxxsupp/libcxx/src/locale.cpp index fc95dad6006..86159010344 100644 --- a/contrib/libs/cxxsupp/libcxx/src/locale.cpp +++ b/contrib/libs/cxxsupp/libcxx/src/locale.cpp @@ -1527,7 +1527,7 @@ char  ctype_byname<wchar_t>::do_narrow(char_type c, char dfault) const  {      int r = __libcpp_wctob_l(c, __l); -    return r != static_cast<int>(WEOF) ? static_cast<char>(r) : dfault; +    return (r != EOF) ? static_cast<char>(r) : dfault;  }  const wchar_t* @@ -1536,7 +1536,7 @@ ctype_byname<wchar_t>::do_narrow(const char_type* low, const char_type* high, ch      for (; low != high; ++low, ++dest)      {          int r = __libcpp_wctob_l(*low, __l); -        *dest = r != static_cast<int>(WEOF) ? static_cast<char>(r) : dfault; +        *dest = (r != EOF) ? static_cast<char>(r) : dfault;      }      return low;  }  | 
