diff options
author | mikhnenko <[email protected]> | 2023-11-30 19:30:11 +0300 |
---|---|---|
committer | mikhnenko <[email protected]> | 2023-11-30 21:58:14 +0300 |
commit | f5d4e4495f6741d8df199dc9f888417ab0485010 (patch) | |
tree | 658aed141d6b671f9fbd56cc448b2f412e30951e /contrib/libs/cxxsupp/libcxx/include/optional | |
parent | 2f7d8b6e692bd7584a66686b5504381631dd4522 (diff) |
Remove unused patches
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/optional')
-rw-r--r-- | contrib/libs/cxxsupp/libcxx/include/optional | 55 |
1 files changed, 30 insertions, 25 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/optional b/contrib/libs/cxxsupp/libcxx/include/optional index b4d4a2cbf4b..39b9f25db5c 100644 --- a/contrib/libs/cxxsupp/libcxx/include/optional +++ b/contrib/libs/cxxsupp/libcxx/include/optional @@ -666,14 +666,16 @@ private: // LWG2756: conditionally explicit conversion from _Up struct _CheckOptionalArgsConstructor { template <class _Up> - static constexpr bool __enable_implicit = - is_constructible_v<_Tp, _Up&&> && - is_convertible_v<_Up&&, _Tp>; + static constexpr bool __enable_implicit() { + return is_constructible_v<_Tp, _Up&&> && + is_convertible_v<_Up&&, _Tp>; + } template <class _Up> - static constexpr bool __enable_explicit = - is_constructible_v<_Tp, _Up&&> && - !is_convertible_v<_Up&&, _Tp>; + static constexpr bool __enable_explicit() { + return is_constructible_v<_Tp, _Up&&> && + !is_convertible_v<_Up&&, _Tp>; + } }; template <class _Up> using _CheckOptionalArgsCtor = _If< @@ -703,19 +705,22 @@ private: is_assignable<_Tp&, _Opt const&&> >; template <class _Up, class _QUp = _QualUp> - static constexpr bool __enable_implicit = - is_convertible<_QUp, _Tp>::value && - !__check_constructible_from_opt<_Up>::value; - + static constexpr bool __enable_implicit() { + return is_convertible<_QUp, _Tp>::value && + !__check_constructible_from_opt<_Up>::value; + } template <class _Up, class _QUp = _QualUp> - static constexpr bool __enable_explicit = - !is_convertible<_QUp, _Tp>::value && - !__check_constructible_from_opt<_Up>::value; - + static constexpr bool __enable_explicit() { + return !is_convertible<_QUp, _Tp>::value && + !__check_constructible_from_opt<_Up>::value; + } template <class _Up, class _QUp = _QualUp> - static constexpr bool __enable_assign = - !__check_constructible_from_opt<_Up>::value && - !__check_assignable_from_opt<_Up>::value; + static constexpr bool __enable_assign() { + // Construction and assignability of _QUp to _Tp has already been + // checked. + return !__check_constructible_from_opt<_Up>::value && + !__check_assignable_from_opt<_Up>::value; + } }; template <class _Up, class _QualUp> @@ -764,14 +769,14 @@ public: : __base(in_place, __il, _VSTD::forward<_Args>(__args)...) {} template <class _Up = value_type, enable_if_t< - _CheckOptionalArgsCtor<_Up>::template __enable_implicit<_Up> + _CheckOptionalArgsCtor<_Up>::template __enable_implicit<_Up>() , int> = 0> _LIBCPP_INLINE_VISIBILITY constexpr optional(_Up&& __v) : __base(in_place, _VSTD::forward<_Up>(__v)) {} template <class _Up, enable_if_t< - _CheckOptionalArgsCtor<_Up>::template __enable_explicit<_Up> + _CheckOptionalArgsCtor<_Up>::template __enable_explicit<_Up>() , int> = 0> _LIBCPP_INLINE_VISIBILITY constexpr explicit optional(_Up&& __v) @@ -779,7 +784,7 @@ public: // LWG2756: conditionally explicit conversion from const optional<_Up>& template <class _Up, enable_if_t< - _CheckOptionalLikeCtor<_Up, _Up const&>::template __enable_implicit<_Up> + _CheckOptionalLikeCtor<_Up, _Up const&>::template __enable_implicit<_Up>() , int> = 0> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 optional(const optional<_Up>& __v) @@ -787,7 +792,7 @@ public: this->__construct_from(__v); } template <class _Up, enable_if_t< - _CheckOptionalLikeCtor<_Up, _Up const&>::template __enable_explicit<_Up> + _CheckOptionalLikeCtor<_Up, _Up const&>::template __enable_explicit<_Up>() , int> = 0> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit optional(const optional<_Up>& __v) @@ -797,7 +802,7 @@ public: // LWG2756: conditionally explicit conversion from optional<_Up>&& template <class _Up, enable_if_t< - _CheckOptionalLikeCtor<_Up, _Up &&>::template __enable_implicit<_Up> + _CheckOptionalLikeCtor<_Up, _Up &&>::template __enable_implicit<_Up>() , int> = 0> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 optional(optional<_Up>&& __v) @@ -805,7 +810,7 @@ public: this->__construct_from(_VSTD::move(__v)); } template <class _Up, enable_if_t< - _CheckOptionalLikeCtor<_Up, _Up &&>::template __enable_explicit<_Up> + _CheckOptionalLikeCtor<_Up, _Up &&>::template __enable_explicit<_Up>() , int> = 0> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit optional(optional<_Up>&& __v) @@ -857,7 +862,7 @@ public: // LWG2756 template <class _Up, enable_if_t< - _CheckOptionalLikeAssign<_Up, _Up const&>::template __enable_assign<_Up> + _CheckOptionalLikeAssign<_Up, _Up const&>::template __enable_assign<_Up>() , int> = 0> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 optional& @@ -869,7 +874,7 @@ public: // LWG2756 template <class _Up, enable_if_t< - _CheckOptionalLikeCtor<_Up, _Up &&>::template __enable_assign<_Up> + _CheckOptionalLikeCtor<_Up, _Up &&>::template __enable_assign<_Up>() , int> = 0> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 optional& |