diff options
author | Andrey Khalyavin <halyavin@gmail.com> | 2022-04-15 02:46:40 +0300 |
---|---|---|
committer | Andrey Khalyavin <halyavin@gmail.com> | 2022-04-15 02:46:40 +0300 |
commit | c5bfd90690e2df55f55d1831b0edd2e1c7241582 (patch) | |
tree | cda6bc446bf17fc110b67126b4c5ddc640fa427b /contrib/libs/cxxsupp/libcxx/include/__algorithm | |
parent | 599463a2ac4bda8536564ec6d7b798447755f05f (diff) | |
download | ydb-c5bfd90690e2df55f55d1831b0edd2e1c7241582.tar.gz |
Update libc++ to b6d87773 (14 Jan 2022).
Notable changes:
* implement operator << for filesystem::directory_entry
* add std::ranges::in_in_result
* add std::ranges::owning_view
* add std::ranges::cdata
* add std::ranges::construct_at and destroy{,_n,_at}
* small fixes in std::ranges::data
* SFINAE away std::ranges::cbegin(const T&&) for non-borrowed T
* use arc4random to implement std::random_device on Apple
* introduce __fits_in_sso to put constexpr check into a central place
* introduce __debug_db_insert_c to put #if and constexpr check into a central place
ref:b3dd06bd52f06e8939227ca0f0a5873d0c211e48
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/__algorithm')
-rw-r--r-- | contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_result.h | 43 | ||||
-rw-r--r-- | contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_result.h | 4 |
2 files changed, 45 insertions, 2 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_result.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_result.h new file mode 100644 index 0000000000..a1416f4cac --- /dev/null +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_result.h @@ -0,0 +1,43 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___ALGORITHM_IN_IN_RESULT_H +#define _LIBCPP___ALGORITHM_IN_IN_RESULT_H + +#include <__concepts/convertible_to.h> +#include <__config> +#include <__utility/move.h> + +_LIBCPP_BEGIN_NAMESPACE_STD + +#ifndef _LIBCPP_HAS_NO_RANGES + +namespace ranges { +template <class _I1, class _I2> +struct in_in_result { + _LIBCPP_NO_UNIQUE_ADDRESS _I1 in1; + _LIBCPP_NO_UNIQUE_ADDRESS _I2 in2; + + template <class _II1, class _II2> + requires convertible_to<const _I1&, _II1> && convertible_to<const _I2&, _II2> + constexpr operator in_in_result<_II1, _II2>() const & { + return {in1, in2}; + } + + template <class _II1, class _II2> + requires convertible_to<_I1, _II1> && convertible_to<_I2, _II2> + constexpr operator in_in_result<_II1, _II2>() && { return {_VSTD::move(in1), _VSTD::move(in2)}; } +}; +} // namespace ranges + +#endif // _LIBCPP_HAS_NO_RANGES + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___ALGORITHM_IN_IN_RESULT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_result.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_result.h index 9d97115720..1aebfa86a4 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_result.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_result.h @@ -25,8 +25,8 @@ namespace ranges { template<class _InputIterator, class _OutputIterator> struct in_out_result { - [[no_unique_address]] _InputIterator in; - [[no_unique_address]] _OutputIterator out; + _LIBCPP_NO_UNIQUE_ADDRESS _InputIterator in; + _LIBCPP_NO_UNIQUE_ADDRESS _OutputIterator out; template <class _InputIterator2, class _OutputIterator2> requires convertible_to<const _InputIterator&, _InputIterator2> && convertible_to<const _OutputIterator&, |