diff options
author | Andrey Khalyavin <halyavin@gmail.com> | 2022-06-02 00:33:58 +0300 |
---|---|---|
committer | Andrey Khalyavin <halyavin@gmail.com> | 2022-06-02 00:33:58 +0300 |
commit | e673b301b03ea16c0bdc9537de9501f1c9b4cf28 (patch) | |
tree | 27631393b7e7889db9ac6fcbd8e6b61b0f5a1ba0 /contrib/libs/cxxsupp/libcxx/include/__algorithm | |
parent | 5424a48cca3b5a79e8431052b74fafb9768e669e (diff) | |
download | ydb-e673b301b03ea16c0bdc9537de9501f1c9b4cf28.tar.gz |
Update libc++ to eaadc451 (4 Feb 2022).
Notable changes:
* fix chrono::duration constructor constraint
* delete base class for std::basic_string
* add ranges::in_out_out_result and ranges::in_in_out_result
* implement indirectly_copyable{,_storable} concepts
* rename __referenceable to __can_reference to match text of the standard
* add _LIBCPP_HAS_NO_CONCEPTS guards where concepts are used
* simplify no concepts guards
* add specifications for basic_common_reference and common_type for pair
* make _VSTD an alias for std so that it can be removed in the future
* remove std from friend declaration to facilitate switch from _VSTD to std
* fix TOCTOU issue with std::filesystem::remove_all
* add additional constraints to std::ranges::get for subranges when N == 0
* pick unique bit for __regex_word constant
* use vsnprintf instead of _vsnprintf on Windows
* ADL-proof ranges::iter_swap and ranges::iter_move
* implement std::ranges::distance
* merge _LIBCPP_HAS_NO_RANGES into _LIBCPP_HAS_NO_CONCEPTS
ref:b637aa39f39243eeac99a2109af1daaac7c29316
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/__algorithm')
4 files changed, 114 insertions, 4 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_out_result.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_out_result.h new file mode 100644 index 0000000000..8130f80867 --- /dev/null +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_out_result.h @@ -0,0 +1,54 @@ +// -*- 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_OUT_RESULT_H +#define _LIBCPP___ALGORITHM_IN_IN_OUT_RESULT_H + +#include <__concepts/convertible_to.h> +#include <__config> +#include <__utility/move.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) + +namespace ranges { + +template <class _I1, class _I2, class _O1> +struct in_in_out_result { + _LIBCPP_NO_UNIQUE_ADDRESS _I1 in1; + _LIBCPP_NO_UNIQUE_ADDRESS _I2 in2; + _LIBCPP_NO_UNIQUE_ADDRESS _O1 out; + + template <class _II1, class _II2, class _OO1> + requires convertible_to<const _I1&, _II1> && convertible_to<const _I2&, _II2> && convertible_to<const _O1&, _OO1> + _LIBCPP_HIDE_FROM_ABI constexpr + operator in_in_out_result<_II1, _II2, _OO1>() const& { + return {in1, in2, out}; + } + + template <class _II1, class _II2, class _OO1> + requires convertible_to<_I1, _II1> && convertible_to<_I2, _II2> && convertible_to<_O1, _OO1> + _LIBCPP_HIDE_FROM_ABI constexpr + operator in_in_out_result<_II1, _II2, _OO1>() && { + return {_VSTD::move(in1), _VSTD::move(in2), _VSTD::move(out)}; + } +}; + +} // namespace ranges + +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___ALGORITHM_IN_IN_OUT_RESULT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_result.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_result.h index 22dc7453b5..48c9807a38 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_result.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_result.h @@ -14,11 +14,16 @@ #include <__config> #include <__utility/move.h> +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif + _LIBCPP_BEGIN_NAMESPACE_STD -#ifndef _LIBCPP_HAS_NO_RANGES +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) namespace ranges { + template <class _I1, class _I2> struct in_in_result { _LIBCPP_NO_UNIQUE_ADDRESS _I1 in1; @@ -36,9 +41,10 @@ struct in_in_result { _LIBCPP_HIDE_FROM_ABI constexpr operator in_in_result<_II1, _II2>() && { return {_VSTD::move(in1), _VSTD::move(in2)}; } }; + } // namespace ranges -#endif // _LIBCPP_HAS_NO_RANGES +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_out_result.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_out_result.h new file mode 100644 index 0000000000..d37ddf99aa --- /dev/null +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_out_result.h @@ -0,0 +1,48 @@ +// -*- 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_OUT_OUT_RESULT_H +#define _LIBCPP___ALGORITHM_IN_OUT_OUT_RESULT_H + +#include <__concepts/convertible_to.h> +#include <__config> +#include <__utility/move.h> + +_LIBCPP_BEGIN_NAMESPACE_STD + +#ifndef _LIBCPP_HAS_NO_CONCEPTS + +namespace ranges { +template <class _I1, class _O1, class _O2> +struct in_out_out_result { + _LIBCPP_NO_UNIQUE_ADDRESS _I1 in; + _LIBCPP_NO_UNIQUE_ADDRESS _O1 out1; + _LIBCPP_NO_UNIQUE_ADDRESS _O2 out2; + + template <class _II1, class _OO1, class _OO2> + requires convertible_to<const _I1&, _II1> && convertible_to<const _O1&, _OO1> && convertible_to<const _O2&, _OO2> + _LIBCPP_HIDE_FROM_ABI constexpr + operator in_out_out_result<_II1, _OO1, _OO2>() const& { + return {in, out1, out2}; + } + + template <class _II1, class _OO1, class _OO2> + requires convertible_to<_I1, _II1> && convertible_to<_O1, _OO1> && convertible_to<_O2, _OO2> + _LIBCPP_HIDE_FROM_ABI constexpr + operator in_out_out_result<_II1, _OO1, _OO2>() && { + return {_VSTD::move(in), _VSTD::move(out1), _VSTD::move(out2)}; + } +}; +} // namespace ranges + +#endif // _LIBCPP_HAS_NO_CONCEPTS + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___ALGORITHM_IN_OUT_OUT_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 1aebfa86a4..c8b0fe9753 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_result.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_result.h @@ -20,7 +20,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if !defined(_LIBCPP_HAS_NO_RANGES) +#if !defined(_LIBCPP_HAS_NO_CONCEPTS) + namespace ranges { template<class _InputIterator, class _OutputIterator> @@ -45,7 +46,8 @@ struct in_out_result { }; } // namespace ranges -#endif // !defined(_LIBCPP_HAS_NO_RANGES) + +#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) _LIBCPP_END_NAMESPACE_STD |