123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576 |
- // -*- C++ -*-
- //===------------------------ propagate_const -----------------------------===//
- //
- // The LLVM Compiler Infrastructure
- //
- // This file is dual licensed under the MIT and the University of Illinois Open
- // Source Licenses. See LICENSE.TXT for details.
- //
- //===----------------------------------------------------------------------===//
- #ifndef _LIBCPP_EXPERIMENTAL_PROPAGATE_CONST
- #define _LIBCPP_EXPERIMENTAL_PROPAGATE_CONST
- /*
- propagate_const synopsis
- namespace std { namespace experimental { inline namespace fundamentals_v2 {
- // [propagate_const]
- template <class T> class propagate_const;
- // [propagate_const.underlying], underlying pointer access
- constexpr const _Tp& _VSTD_LFTS_V2::get_underlying(const propagate_const<T>& pt) noexcept;
- constexpr T& _VSTD_LFTS_V2::get_underlying(propagate_const<T>& pt) noexcept;
- // [propagate_const.relational], relational operators
- template <class T> constexpr bool operator==(const propagate_const<T>& pt, nullptr_t);
- template <class T> constexpr bool operator==(nullptr_t, const propagate_const<T>& pu);
- template <class T> constexpr bool operator!=(const propagate_const<T>& pt, nullptr_t);
- template <class T> constexpr bool operator!=(nullptr_t, const propagate_const<T>& pu);
- template <class T, class U> constexpr bool operator==(const propagate_const<T>& pt, const propagate_const<_Up>& pu);
- template <class T, class U> constexpr bool operator!=(const propagate_const<T>& pt, const propagate_const<_Up>& pu);
- template <class T, class U> constexpr bool operator<(const propagate_const<T>& pt, const propagate_const<_Up>& pu);
- template <class T, class U> constexpr bool operator>(const propagate_const<T>& pt, const propagate_const<_Up>& pu);
- template <class T, class U> constexpr bool operator<=(const propagate_const<T>& pt, const propagate_const<_Up>& pu);
- template <class T, class U> constexpr bool operator>=(const propagate_const<T>& pt, const propagate_const<_Up>& pu);
- template <class T, class U> constexpr bool operator==(const propagate_const<T>& pt, const _Up& u);
- template <class T, class U> constexpr bool operator!=(const propagate_const<T>& pt, const _Up& u);
- template <class T, class U> constexpr bool operator<(const propagate_const<T>& pt, const _Up& u);
- template <class T, class U> constexpr bool operator>(const propagate_const<T>& pt, const _Up& u);
- template <class T, class U> constexpr bool operator<=(const propagate_const<T>& pt, const _Up& u);
- template <class T, class U> constexpr bool operator>=(const propagate_const<T>& pt, const _Up& u);
- template <class T, class U> constexpr bool operator==(const _Tp& t, const propagate_const<_Up>& pu);
- template <class T, class U> constexpr bool operator!=(const _Tp& t, const propagate_const<_Up>& pu);
- template <class T, class U> constexpr bool operator<(const _Tp& t, const propagate_const<_Up>& pu);
- template <class T, class U> constexpr bool operator>(const _Tp& t, const propagate_const<_Up>& pu);
- template <class T, class U> constexpr bool operator<=(const _Tp& t, const propagate_const<_Up>& pu);
- template <class T, class U> constexpr bool operator>=(const _Tp& t, const propagate_const<_Up>& pu);
- // [propagate_const.algorithms], specialized algorithms
- template <class T> constexpr void swap(propagate_const<T>& pt, propagate_const<T>& pu) noexcept(see below);
- template <class T>
- class propagate_const
- {
- public:
- typedef remove_reference_t<decltype(*declval<T&>())> element_type;
- // [propagate_const.ctor], constructors
- constexpr propagate_const() = default;
- propagate_const(const propagate_const& p) = delete;
- constexpr propagate_const(propagate_const&& p) = default;
- template <class U> EXPLICIT constexpr propagate_const(propagate_const<_Up>&& pu); // see below
- template <class U> EXPLICIT constexpr propagate_const(U&& u); // see below
- // [propagate_const.assignment], assignment
- propagate_const& operator=(const propagate_const& p) = delete;
- constexpr propagate_const& operator=(propagate_const&& p) = default;
- template <class U> constexpr propagate_const& operator=(propagate_const<_Up>&& pu);
- template <class U> constexpr propagate_const& operator=(U&& u); // see below
- // [propagate_const.const_observers], const observers
- explicit constexpr operator bool() const;
- constexpr const element_type* operator->() const;
- constexpr operator const element_type*() const; // Not always defined
- constexpr const element_type& operator*() const;
- constexpr const element_type* get() const;
- // [propagate_const.non_const_observers], non-const observers
- constexpr element_type* operator->();
- constexpr operator element_type*(); // Not always defined
- constexpr element_type& operator*();
- constexpr element_type* get();
- // [propagate_const.modifiers], modifiers
- constexpr void swap(propagate_const& pt) noexcept(see below)
- private:
- T t_; // exposition only
- };
- } // namespace fundamentals_v2
- } // namespace experimental
- // [propagate_const.hash], hash support
- template <class T> struct hash<experimental::fundamentals_v2::propagate_const<T>>;
- // [propagate_const.comparison_function_objects], comparison function objects
- template <class T> struct equal_to<experimental::fundamentals_v2::propagate_const<T>>;
- template <class T> struct not_equal_to<experimental::fundamentals_v2::propagate_const<T>>;
- template <class T> struct less<experimental::fundamentals_v2::propagate_const<T>>;
- template <class T> struct greater<experimental::fundamentals_v2::propagate_const<T>>;
- template <class T> struct less_equal<experimental::fundamentals_v2::propagate_const<T>>;
- template <class T> struct greater_equal<experimental::fundamentals_v2::propagate_const<T>>;
- } // namespace std
- */
- #include <experimental/__config>
- #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
- #pragma GCC system_header
- #endif
- #if _LIBCPP_STD_VER > 11
- #include <type_traits>
- #include <utility>
- #include <functional>
- _LIBCPP_BEGIN_NAMESPACE_LFTS_V2
- template <class _Tp>
- class propagate_const;
- template <class _Up> _LIBCPP_CONSTEXPR const _Up& get_underlying(const propagate_const<_Up>& __pu) _NOEXCEPT;
- template <class _Up> _LIBCPP_CONSTEXPR _Up& get_underlying(propagate_const<_Up>& __pu) _NOEXCEPT;
- template <class _Tp>
- class propagate_const
- {
- public:
- typedef remove_reference_t<decltype(*_VSTD::declval<_Tp&>())> element_type;
- static_assert(!is_array<_Tp>::value,
- "Instantiation of propagate_const with an array type is ill-formed.");
- static_assert(!is_reference<_Tp>::value,
- "Instantiation of propagate_const with a reference type is ill-formed.");
- static_assert(!(is_pointer<_Tp>::value && is_function<typename remove_pointer<_Tp>::type>::value),
- "Instantiation of propagate_const with a function-pointer type is ill-formed.");
- static_assert(!(is_pointer<_Tp>::value && is_same<typename remove_cv<typename remove_pointer<_Tp>::type>::type, void>::value),
- "Instantiation of propagate_const with a pointer to (possibly cv-qualified) void is ill-formed.");
- private:
- template <class _Up>
- static _LIBCPP_CONSTEXPR element_type* __get_pointer(_Up* __u)
- {
- return __u;
- }
- template <class _Up>
- static _LIBCPP_CONSTEXPR element_type* __get_pointer(_Up& __u)
- {
- return __get_pointer(__u.get());
- }
- template <class _Up>
- static _LIBCPP_CONSTEXPR const element_type* __get_pointer(const _Up* __u)
- {
- return __u;
- }
- template <class _Up>
- static _LIBCPP_CONSTEXPR const element_type* __get_pointer(const _Up& __u)
- {
- return __get_pointer(__u.get());
- }
- template <class _Up>
- struct __is_propagate_const : false_type
- {
- };
- template <class _Up>
- struct __is_propagate_const<propagate_const<_Up>> : true_type
- {
- };
- _Tp __t_;
- public:
- template <class _Up> friend _LIBCPP_CONSTEXPR const _Up& ::_VSTD_LFTS_V2::get_underlying(const propagate_const<_Up>& __pu) _NOEXCEPT;
- template <class _Up> friend _LIBCPP_CONSTEXPR _Up& ::_VSTD_LFTS_V2::get_underlying(propagate_const<_Up>& __pu) _NOEXCEPT;
- _LIBCPP_CONSTEXPR propagate_const() = default;
- propagate_const(const propagate_const&) = delete;
- _LIBCPP_CONSTEXPR propagate_const(propagate_const&&) = default;
- template <class _Up, enable_if_t<!is_convertible<_Up, _Tp>::value &&
- is_constructible<_Tp, _Up&&>::value,bool> = true>
- explicit _LIBCPP_CONSTEXPR propagate_const(propagate_const<_Up>&& __pu)
- : __t_(std::move(_VSTD_LFTS_V2::get_underlying(__pu)))
- {
- }
- template <class _Up, enable_if_t<is_convertible<_Up&&, _Tp>::value &&
- is_constructible<_Tp, _Up&&>::value,bool> = false>
- _LIBCPP_CONSTEXPR propagate_const(propagate_const<_Up>&& __pu)
- : __t_(std::move(_VSTD_LFTS_V2::get_underlying(__pu)))
- {
- }
- template <class _Up, enable_if_t<!is_convertible<_Up&&, _Tp>::value &&
- is_constructible<_Tp, _Up&&>::value &&
- !__is_propagate_const<decay_t<_Up>>::value,bool> = true>
- explicit _LIBCPP_CONSTEXPR propagate_const(_Up&& __u)
- : __t_(std::forward<_Up>(__u))
- {
- }
- template <class _Up, enable_if_t<is_convertible<_Up&&, _Tp>::value &&
- is_constructible<_Tp, _Up&&>::value &&
- !__is_propagate_const<decay_t<_Up>>::value,bool> = false>
- _LIBCPP_CONSTEXPR propagate_const(_Up&& __u)
- : __t_(std::forward<_Up>(__u))
- {
- }
- propagate_const& operator=(const propagate_const&) = delete;
- _LIBCPP_CONSTEXPR propagate_const& operator=(propagate_const&&) = default;
- template <class _Up>
- _LIBCPP_CONSTEXPR propagate_const& operator=(propagate_const<_Up>&& __pu)
- {
- __t_ = std::move(_VSTD_LFTS_V2::get_underlying(__pu));
- return *this;
- }
- template <class _Up, class _Vp = enable_if_t<!__is_propagate_const<decay_t<_Up>>::value>>
- _LIBCPP_CONSTEXPR propagate_const& operator=(_Up&& __u)
- {
- __t_ = std::forward<_Up>(__u);
- return *this;
- }
- _LIBCPP_CONSTEXPR const element_type* get() const
- {
- return __get_pointer(__t_);
- }
- _LIBCPP_CONSTEXPR element_type* get()
- {
- return __get_pointer(__t_);
- }
- explicit _LIBCPP_CONSTEXPR operator bool() const
- {
- return get() != nullptr;
- }
- _LIBCPP_CONSTEXPR const element_type* operator->() const
- {
- return get();
- }
- template <class _Tp_ = _Tp, class _Up = enable_if_t<is_convertible<
- const _Tp_, const element_type *>::value>>
- _LIBCPP_CONSTEXPR operator const element_type *() const {
- return get();
- }
- _LIBCPP_CONSTEXPR const element_type& operator*() const
- {
- return *get();
- }
- _LIBCPP_CONSTEXPR element_type* operator->()
- {
- return get();
- }
- template <class _Tp_ = _Tp, class _Up = enable_if_t<
- is_convertible<_Tp_, element_type *>::value>>
- _LIBCPP_CONSTEXPR operator element_type *() {
- return get();
- }
- _LIBCPP_CONSTEXPR element_type& operator*()
- {
- return *get();
- }
- _LIBCPP_CONSTEXPR void swap(propagate_const& __pt) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value)
- {
- using _VSTD::swap;
- swap(__t_, __pt.__t_);
- }
- };
- template <class _Tp>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR bool operator==(const propagate_const<_Tp>& __pt, nullptr_t)
- {
- return _VSTD_LFTS_V2::get_underlying(__pt) == nullptr;
- }
- template <class _Tp>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR bool operator==(nullptr_t, const propagate_const<_Tp>& __pt)
- {
- return nullptr == _VSTD_LFTS_V2::get_underlying(__pt);
- }
- template <class _Tp>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR bool operator!=(const propagate_const<_Tp>& __pt, nullptr_t)
- {
- return _VSTD_LFTS_V2::get_underlying(__pt) != nullptr;
- }
- template <class _Tp>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR bool operator!=(nullptr_t, const propagate_const<_Tp>& __pt)
- {
- return nullptr != _VSTD_LFTS_V2::get_underlying(__pt);
- }
- template <class _Tp, class _Up>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR bool operator==(const propagate_const<_Tp>& __pt,
- const propagate_const<_Up>& __pu)
- {
- return _VSTD_LFTS_V2::get_underlying(__pt) == _VSTD_LFTS_V2::get_underlying(__pu);
- }
- template <class _Tp, class _Up>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR bool operator!=(const propagate_const<_Tp>& __pt,
- const propagate_const<_Up>& __pu)
- {
- return _VSTD_LFTS_V2::get_underlying(__pt) != _VSTD_LFTS_V2::get_underlying(__pu);
- }
- template <class _Tp, class _Up>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR bool operator<(const propagate_const<_Tp>& __pt,
- const propagate_const<_Up>& __pu)
- {
- return _VSTD_LFTS_V2::get_underlying(__pt) < _VSTD_LFTS_V2::get_underlying(__pu);
- }
- template <class _Tp, class _Up>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR bool operator>(const propagate_const<_Tp>& __pt,
- const propagate_const<_Up>& __pu)
- {
- return _VSTD_LFTS_V2::get_underlying(__pt) > _VSTD_LFTS_V2::get_underlying(__pu);
- }
- template <class _Tp, class _Up>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR bool operator<=(const propagate_const<_Tp>& __pt,
- const propagate_const<_Up>& __pu)
- {
- return _VSTD_LFTS_V2::get_underlying(__pt) <= _VSTD_LFTS_V2::get_underlying(__pu);
- }
- template <class _Tp, class _Up>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR bool operator>=(const propagate_const<_Tp>& __pt,
- const propagate_const<_Up>& __pu)
- {
- return _VSTD_LFTS_V2::get_underlying(__pt) >= _VSTD_LFTS_V2::get_underlying(__pu);
- }
- template <class _Tp, class _Up>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR bool operator==(const propagate_const<_Tp>& __pt, const _Up& __u)
- {
- return _VSTD_LFTS_V2::get_underlying(__pt) == __u;
- }
- template <class _Tp, class _Up>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR bool operator!=(const propagate_const<_Tp>& __pt, const _Up& __u)
- {
- return _VSTD_LFTS_V2::get_underlying(__pt) != __u;
- }
- template <class _Tp, class _Up>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR bool operator<(const propagate_const<_Tp>& __pt, const _Up& __u)
- {
- return _VSTD_LFTS_V2::get_underlying(__pt) < __u;
- }
- template <class _Tp, class _Up>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR bool operator>(const propagate_const<_Tp>& __pt, const _Up& __u)
- {
- return _VSTD_LFTS_V2::get_underlying(__pt) > __u;
- }
- template <class _Tp, class _Up>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR bool operator<=(const propagate_const<_Tp>& __pt, const _Up& __u)
- {
- return _VSTD_LFTS_V2::get_underlying(__pt) <= __u;
- }
- template <class _Tp, class _Up>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR bool operator>=(const propagate_const<_Tp>& __pt, const _Up& __u)
- {
- return _VSTD_LFTS_V2::get_underlying(__pt) >= __u;
- }
- template <class _Tp, class _Up>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR bool operator==(const _Tp& __t, const propagate_const<_Up>& __pu)
- {
- return __t == _VSTD_LFTS_V2::get_underlying(__pu);
- }
- template <class _Tp, class _Up>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR bool operator!=(const _Tp& __t, const propagate_const<_Up>& __pu)
- {
- return __t != _VSTD_LFTS_V2::get_underlying(__pu);
- }
- template <class _Tp, class _Up>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR bool operator<(const _Tp& __t, const propagate_const<_Up>& __pu)
- {
- return __t < _VSTD_LFTS_V2::get_underlying(__pu);
- }
- template <class _Tp, class _Up>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR bool operator>(const _Tp& __t, const propagate_const<_Up>& __pu)
- {
- return __t > _VSTD_LFTS_V2::get_underlying(__pu);
- }
- template <class _Tp, class _Up>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR bool operator<=(const _Tp& __t, const propagate_const<_Up>& __pu)
- {
- return __t <= _VSTD_LFTS_V2::get_underlying(__pu);
- }
- template <class _Tp, class _Up>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR bool operator>=(const _Tp& __t, const propagate_const<_Up>& __pu)
- {
- return __t >= _VSTD_LFTS_V2::get_underlying(__pu);
- }
- template <class _Tp>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR void swap(propagate_const<_Tp>& __pc1, propagate_const<_Tp>& __pc2) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value)
- {
- using _VSTD::swap;
- swap(_VSTD_LFTS_V2::get_underlying(__pc1), _VSTD_LFTS_V2::get_underlying(__pc2));
- }
- template <class _Tp>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR const _Tp& get_underlying(const propagate_const<_Tp>& __pt) _NOEXCEPT
- {
- return __pt.__t_;
- }
- template <class _Tp>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR _Tp& get_underlying(propagate_const<_Tp>& __pt) _NOEXCEPT
- {
- return __pt.__t_;
- }
- _LIBCPP_END_NAMESPACE_LFTS_V2
- _LIBCPP_BEGIN_NAMESPACE_STD
- template <class _Tp>
- struct hash<experimental::fundamentals_v2::propagate_const<_Tp>>
- {
- typedef size_t result_type;
- typedef experimental::fundamentals_v2::propagate_const<_Tp> argument_type;
- size_t operator()(const experimental::fundamentals_v2::propagate_const<_Tp>& __pc1) const
- {
- return std::hash<_Tp>()(_VSTD_LFTS_V2::get_underlying(__pc1));
- }
- };
- template <class _Tp>
- struct equal_to<experimental::fundamentals_v2::propagate_const<_Tp>>
- {
- typedef experimental::fundamentals_v2::propagate_const<_Tp> first_argument_type;
- typedef experimental::fundamentals_v2::propagate_const<_Tp> second_argument_type;
- bool operator()(const experimental::fundamentals_v2::propagate_const<_Tp>& __pc1,
- const experimental::fundamentals_v2::propagate_const<_Tp>& __pc2) const
- {
- return std::equal_to<_Tp>()(_VSTD_LFTS_V2::get_underlying(__pc1), _VSTD_LFTS_V2::get_underlying(__pc2));
- }
- };
- template <class _Tp>
- struct not_equal_to<experimental::fundamentals_v2::propagate_const<_Tp>>
- {
- typedef experimental::fundamentals_v2::propagate_const<_Tp> first_argument_type;
- typedef experimental::fundamentals_v2::propagate_const<_Tp> second_argument_type;
- bool operator()(const experimental::fundamentals_v2::propagate_const<_Tp>& __pc1,
- const experimental::fundamentals_v2::propagate_const<_Tp>& __pc2) const
- {
- return std::not_equal_to<_Tp>()(_VSTD_LFTS_V2::get_underlying(__pc1), _VSTD_LFTS_V2::get_underlying(__pc2));
- }
- };
- template <class _Tp>
- struct less<experimental::fundamentals_v2::propagate_const<_Tp>>
- {
- typedef experimental::fundamentals_v2::propagate_const<_Tp> first_argument_type;
- typedef experimental::fundamentals_v2::propagate_const<_Tp> second_argument_type;
- bool operator()(const experimental::fundamentals_v2::propagate_const<_Tp>& __pc1,
- const experimental::fundamentals_v2::propagate_const<_Tp>& __pc2) const
- {
- return std::less<_Tp>()(_VSTD_LFTS_V2::get_underlying(__pc1), _VSTD_LFTS_V2::get_underlying(__pc2));
- }
- };
- template <class _Tp>
- struct greater<experimental::fundamentals_v2::propagate_const<_Tp>>
- {
- typedef experimental::fundamentals_v2::propagate_const<_Tp> first_argument_type;
- typedef experimental::fundamentals_v2::propagate_const<_Tp> second_argument_type;
- bool operator()(const experimental::fundamentals_v2::propagate_const<_Tp>& __pc1,
- const experimental::fundamentals_v2::propagate_const<_Tp>& __pc2) const
- {
- return std::greater<_Tp>()(_VSTD_LFTS_V2::get_underlying(__pc1), _VSTD_LFTS_V2::get_underlying(__pc2));
- }
- };
- template <class _Tp>
- struct less_equal<experimental::fundamentals_v2::propagate_const<_Tp>>
- {
- typedef experimental::fundamentals_v2::propagate_const<_Tp> first_argument_type;
- typedef experimental::fundamentals_v2::propagate_const<_Tp> second_argument_type;
- bool operator()(const experimental::fundamentals_v2::propagate_const<_Tp>& __pc1,
- const experimental::fundamentals_v2::propagate_const<_Tp>& __pc2) const
- {
- return std::less_equal<_Tp>()(_VSTD_LFTS_V2::get_underlying(__pc1), _VSTD_LFTS_V2::get_underlying(__pc2));
- }
- };
- template <class _Tp>
- struct greater_equal<experimental::fundamentals_v2::propagate_const<_Tp>>
- {
- typedef experimental::fundamentals_v2::propagate_const<_Tp> first_argument_type;
- typedef experimental::fundamentals_v2::propagate_const<_Tp> second_argument_type;
- bool operator()(const experimental::fundamentals_v2::propagate_const<_Tp>& __pc1,
- const experimental::fundamentals_v2::propagate_const<_Tp>& __pc2) const
- {
- return std::greater_equal<_Tp>()(_VSTD_LFTS_V2::get_underlying(__pc1), _VSTD_LFTS_V2::get_underlying(__pc2));
- }
- };
- _LIBCPP_END_NAMESPACE_STD
- #endif // _LIBCPP_STD_VER > 11
- #endif // _LIBCPP_EXPERIMENTAL_PROPAGATE_CONST
|