Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/c++/v1/experimental/propagate_const is written in an unsupported language. File is not indexed.

0001 // -*- C++ -*-
0002 //===----------------------------------------------------------------------===//
0003 //
0004 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0005 // See https://llvm.org/LICENSE.txt for license information.
0006 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0007 //
0008 //===----------------------------------------------------------------------===//
0009 
0010 #ifndef _LIBCPP_EXPERIMENTAL_PROPAGATE_CONST
0011 #define _LIBCPP_EXPERIMENTAL_PROPAGATE_CONST
0012 
0013 /*
0014     propagate_const synopsis
0015 
0016     namespace std { namespace experimental { inline namespace fundamentals_v2 {
0017 
0018     // [propagate_const]
0019     template <class T> class propagate_const;
0020 
0021     // [propagate_const.underlying], underlying pointer access
0022     constexpr const _Tp& get_underlying(const propagate_const<T>& pt) noexcept;
0023     constexpr T& get_underlying(propagate_const<T>& pt) noexcept;
0024 
0025     // [propagate_const.relational], relational operators
0026     template <class T> constexpr bool operator==(const propagate_const<T>& pt, nullptr_t);
0027     template <class T> constexpr bool operator==(nullptr_t, const propagate_const<T>& pu);
0028     template <class T> constexpr bool operator!=(const propagate_const<T>& pt, nullptr_t);
0029     template <class T> constexpr bool operator!=(nullptr_t, const propagate_const<T>& pu);
0030     template <class T, class U> constexpr bool operator==(const propagate_const<T>& pt, const propagate_const<_Up>& pu);
0031     template <class T, class U> constexpr bool operator!=(const propagate_const<T>& pt, const propagate_const<_Up>& pu);
0032     template <class T, class U> constexpr bool operator<(const propagate_const<T>& pt, const propagate_const<_Up>& pu);
0033     template <class T, class U> constexpr bool operator>(const propagate_const<T>& pt, const propagate_const<_Up>& pu);
0034     template <class T, class U> constexpr bool operator<=(const propagate_const<T>& pt, const propagate_const<_Up>& pu);
0035     template <class T, class U> constexpr bool operator>=(const propagate_const<T>& pt, const propagate_const<_Up>& pu);
0036     template <class T, class U> constexpr bool operator==(const propagate_const<T>& pt, const _Up& u);
0037     template <class T, class U> constexpr bool operator!=(const propagate_const<T>& pt, const _Up& u);
0038     template <class T, class U> constexpr bool operator<(const propagate_const<T>& pt, const _Up& u);
0039     template <class T, class U> constexpr bool operator>(const propagate_const<T>& pt, const _Up& u);
0040     template <class T, class U> constexpr bool operator<=(const propagate_const<T>& pt, const _Up& u);
0041     template <class T, class U> constexpr bool operator>=(const propagate_const<T>& pt, const _Up& u);
0042     template <class T, class U> constexpr bool operator==(const _Tp& t, const propagate_const<_Up>& pu);
0043     template <class T, class U> constexpr bool operator!=(const _Tp& t, const propagate_const<_Up>& pu);
0044     template <class T, class U> constexpr bool operator<(const _Tp& t, const propagate_const<_Up>& pu);
0045     template <class T, class U> constexpr bool operator>(const _Tp& t, const propagate_const<_Up>& pu);
0046     template <class T, class U> constexpr bool operator<=(const _Tp& t, const propagate_const<_Up>& pu);
0047     template <class T, class U> constexpr bool operator>=(const _Tp& t, const propagate_const<_Up>& pu);
0048 
0049     // [propagate_const.algorithms], specialized algorithms
0050     template <class T> constexpr void swap(propagate_const<T>& pt, propagate_const<T>& pu) noexcept(see below);
0051 
0052     template <class T>
0053     class propagate_const
0054     {
0055 
0056     public:
0057       typedef remove_reference_t<decltype(*declval<T&>())> element_type;
0058 
0059       // [propagate_const.ctor], constructors
0060       constexpr propagate_const() = default;
0061       propagate_const(const propagate_const& p) = delete;
0062       constexpr propagate_const(propagate_const&& p) = default;
0063       template <class U> EXPLICIT constexpr propagate_const(propagate_const<_Up>&& pu); // see below
0064       template <class U> EXPLICIT constexpr propagate_const(U&& u); // see below
0065 
0066       // [propagate_const.assignment], assignment
0067       propagate_const& operator=(const propagate_const& p) = delete;
0068       constexpr propagate_const& operator=(propagate_const&& p) = default;
0069       template <class U> constexpr propagate_const& operator=(propagate_const<_Up>&& pu);
0070       template <class U> constexpr propagate_const& operator=(U&& u); // see below
0071 
0072       // [propagate_const.const_observers], const observers
0073       explicit constexpr operator bool() const;
0074       constexpr const element_type* operator->() const;
0075       constexpr operator const element_type*() const; // Not always defined
0076       constexpr const element_type& operator*() const;
0077       constexpr const element_type* get() const;
0078 
0079       // [propagate_const.non_const_observers], non-const observers
0080       constexpr element_type* operator->();
0081       constexpr operator element_type*(); // Not always defined
0082       constexpr element_type& operator*();
0083       constexpr element_type* get();
0084 
0085       // [propagate_const.modifiers], modifiers
0086       constexpr void swap(propagate_const& pt) noexcept(see below)
0087 
0088     private:
0089       T t_; // exposition only
0090     };
0091 
0092   } // namespace fundamentals_v2
0093   } // namespace experimental
0094 
0095   // [propagate_const.hash], hash support
0096   template <class T> struct hash<experimental::propagate_const<T>>;
0097 
0098   // [propagate_const.comparison_function_objects], comparison function objects
0099   template <class T> struct equal_to<experimental::propagate_const<T>>;
0100   template <class T> struct not_equal_to<experimental::propagate_const<T>>;
0101   template <class T> struct less<experimental::propagate_const<T>>;
0102   template <class T> struct greater<experimental::propagate_const<T>>;
0103   template <class T> struct less_equal<experimental::propagate_const<T>>;
0104   template <class T> struct greater_equal<experimental::propagate_const<T>>;
0105 
0106 } // namespace std
0107 
0108 */
0109 
0110 #if __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
0111 #  include <__cxx03/experimental/propagate_const>
0112 #else
0113 #  include <__config>
0114 #  include <__cstddef/nullptr_t.h>
0115 #  include <__cstddef/size_t.h>
0116 #  include <__functional/operations.h>
0117 #  include <__fwd/functional.h>
0118 #  include <__type_traits/conditional.h>
0119 #  include <__type_traits/decay.h>
0120 #  include <__type_traits/enable_if.h>
0121 #  include <__type_traits/is_array.h>
0122 #  include <__type_traits/is_constructible.h>
0123 #  include <__type_traits/is_convertible.h>
0124 #  include <__type_traits/is_function.h>
0125 #  include <__type_traits/is_pointer.h>
0126 #  include <__type_traits/is_reference.h>
0127 #  include <__type_traits/is_same.h>
0128 #  include <__type_traits/is_swappable.h>
0129 #  include <__type_traits/remove_cv.h>
0130 #  include <__type_traits/remove_pointer.h>
0131 #  include <__type_traits/remove_reference.h>
0132 #  include <__utility/declval.h>
0133 #  include <__utility/forward.h>
0134 #  include <__utility/move.h>
0135 #  include <__utility/swap.h>
0136 #  include <version>
0137 
0138 #  if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0139 #    pragma GCC system_header
0140 #  endif
0141 
0142 _LIBCPP_PUSH_MACROS
0143 #  include <__undef_macros>
0144 
0145 #  if _LIBCPP_STD_VER >= 14
0146 
0147 _LIBCPP_BEGIN_NAMESPACE_LFTS_V2
0148 
0149 template <class _Tp>
0150 class propagate_const;
0151 
0152 template <class _Up>
0153 inline _LIBCPP_HIDE_FROM_ABI constexpr const _Up& get_underlying(const propagate_const<_Up>& __pu) _NOEXCEPT;
0154 
0155 template <class _Up>
0156 inline _LIBCPP_HIDE_FROM_ABI constexpr _Up& get_underlying(propagate_const<_Up>& __pu) _NOEXCEPT;
0157 
0158 template <class _Tp>
0159 class propagate_const {
0160 public:
0161   typedef remove_reference_t<decltype(*std::declval<_Tp&>())> element_type;
0162 
0163   static_assert(!is_array<_Tp>::value, "Instantiation of propagate_const with an array type is ill-formed.");
0164   static_assert(!is_reference<_Tp>::value, "Instantiation of propagate_const with a reference type is ill-formed.");
0165   static_assert(!(is_pointer<_Tp>::value && is_function<__remove_pointer_t<_Tp> >::value),
0166                 "Instantiation of propagate_const with a function-pointer type is ill-formed.");
0167   static_assert(!(is_pointer<_Tp>::value && is_same<__remove_cv_t<__remove_pointer_t<_Tp> >, void>::value),
0168                 "Instantiation of propagate_const with a pointer to (possibly cv-qualified) void is ill-formed.");
0169 
0170 private:
0171   template <class _Up>
0172   static _LIBCPP_HIDE_FROM_ABI constexpr element_type* __get_pointer(_Up* __u) {
0173     return __u;
0174   }
0175 
0176   template <class _Up>
0177   static _LIBCPP_HIDE_FROM_ABI constexpr element_type* __get_pointer(_Up& __u) {
0178     return __get_pointer(__u.get());
0179   }
0180 
0181   template <class _Up>
0182   static _LIBCPP_HIDE_FROM_ABI constexpr const element_type* __get_pointer(const _Up* __u) {
0183     return __u;
0184   }
0185 
0186   template <class _Up>
0187   static _LIBCPP_HIDE_FROM_ABI constexpr const element_type* __get_pointer(const _Up& __u) {
0188     return __get_pointer(__u.get());
0189   }
0190 
0191   template <class _Up>
0192   struct __is_propagate_const : false_type {};
0193 
0194   template <class _Up>
0195   struct __is_propagate_const<propagate_const<_Up>> : true_type {};
0196 
0197   _Tp __t_;
0198 
0199 public:
0200   template <class _Up>
0201   friend constexpr const _Up& experimental::fundamentals_v2::get_underlying(const propagate_const<_Up>& __pu) _NOEXCEPT;
0202   template <class _Up>
0203   friend constexpr _Up& experimental::fundamentals_v2::get_underlying(propagate_const<_Up>& __pu) _NOEXCEPT;
0204 
0205   _LIBCPP_HIDE_FROM_ABI constexpr propagate_const() = default;
0206 
0207   propagate_const(const propagate_const&) = delete;
0208 
0209   _LIBCPP_HIDE_FROM_ABI constexpr propagate_const(propagate_const&&) = default;
0210 
0211   template <class _Up,
0212             enable_if_t<!is_convertible<_Up, _Tp>::value && is_constructible<_Tp, _Up&&>::value, bool> = true>
0213   explicit _LIBCPP_HIDE_FROM_ABI constexpr propagate_const(propagate_const<_Up>&& __pu)
0214       : __t_(std::move(experimental::get_underlying(__pu))) {}
0215 
0216   template <class _Up,
0217             enable_if_t<is_convertible<_Up&&, _Tp>::value && is_constructible<_Tp, _Up&&>::value, bool> = false>
0218   _LIBCPP_HIDE_FROM_ABI constexpr propagate_const(propagate_const<_Up>&& __pu)
0219       : __t_(std::move(experimental::get_underlying(__pu))) {}
0220 
0221   template <class _Up,
0222             enable_if_t<!is_convertible<_Up&&, _Tp>::value && is_constructible<_Tp, _Up&&>::value &&
0223                             !__is_propagate_const<decay_t<_Up>>::value,
0224                         bool> = true>
0225   explicit _LIBCPP_HIDE_FROM_ABI constexpr propagate_const(_Up&& __u) : __t_(std::forward<_Up>(__u)) {}
0226 
0227   template <class _Up,
0228             enable_if_t<is_convertible<_Up&&, _Tp>::value && is_constructible<_Tp, _Up&&>::value &&
0229                             !__is_propagate_const<decay_t<_Up>>::value,
0230                         bool> = false>
0231   _LIBCPP_HIDE_FROM_ABI constexpr propagate_const(_Up&& __u) : __t_(std::forward<_Up>(__u)) {}
0232 
0233   propagate_const& operator=(const propagate_const&) = delete;
0234 
0235   _LIBCPP_HIDE_FROM_ABI constexpr propagate_const& operator=(propagate_const&&) = default;
0236 
0237   template <class _Up>
0238   _LIBCPP_HIDE_FROM_ABI constexpr propagate_const& operator=(propagate_const<_Up>&& __pu) {
0239     __t_ = std::move(experimental::get_underlying(__pu));
0240     return *this;
0241   }
0242 
0243   template <class _Up, class _Vp = enable_if_t<!__is_propagate_const<decay_t<_Up>>::value>>
0244   _LIBCPP_HIDE_FROM_ABI constexpr propagate_const& operator=(_Up&& __u) {
0245     __t_ = std::forward<_Up>(__u);
0246     return *this;
0247   }
0248 
0249   _LIBCPP_HIDE_FROM_ABI constexpr const element_type* get() const { return __get_pointer(__t_); }
0250 
0251   _LIBCPP_HIDE_FROM_ABI constexpr element_type* get() { return __get_pointer(__t_); }
0252 
0253   _LIBCPP_HIDE_FROM_ABI explicit constexpr operator bool() const { return get() != nullptr; }
0254 
0255   _LIBCPP_HIDE_FROM_ABI constexpr const element_type* operator->() const { return get(); }
0256 
0257   template <class _Dummy = _Tp, class _Up = enable_if_t<is_convertible< const _Dummy, const element_type*>::value>>
0258   _LIBCPP_HIDE_FROM_ABI constexpr operator const element_type*() const {
0259     return get();
0260   }
0261 
0262   _LIBCPP_HIDE_FROM_ABI constexpr const element_type& operator*() const { return *get(); }
0263 
0264   _LIBCPP_HIDE_FROM_ABI constexpr element_type* operator->() { return get(); }
0265 
0266   template <class _Dummy = _Tp, class _Up = enable_if_t< is_convertible<_Dummy, element_type*>::value>>
0267   _LIBCPP_HIDE_FROM_ABI constexpr operator element_type*() {
0268     return get();
0269   }
0270 
0271   _LIBCPP_HIDE_FROM_ABI constexpr element_type& operator*() { return *get(); }
0272 
0273   _LIBCPP_HIDE_FROM_ABI constexpr void swap(propagate_const& __pt) noexcept(__is_nothrow_swappable_v<_Tp>) {
0274     using std::swap;
0275     swap(__t_, __pt.__t_);
0276   }
0277 };
0278 
0279 template <class _Tp>
0280 _LIBCPP_HIDE_FROM_ABI constexpr bool operator==(const propagate_const<_Tp>& __pt, nullptr_t) {
0281   return experimental::get_underlying(__pt) == nullptr;
0282 }
0283 
0284 template <class _Tp>
0285 _LIBCPP_HIDE_FROM_ABI constexpr bool operator==(nullptr_t, const propagate_const<_Tp>& __pt) {
0286   return nullptr == experimental::get_underlying(__pt);
0287 }
0288 
0289 template <class _Tp>
0290 _LIBCPP_HIDE_FROM_ABI constexpr bool operator!=(const propagate_const<_Tp>& __pt, nullptr_t) {
0291   return experimental::get_underlying(__pt) != nullptr;
0292 }
0293 
0294 template <class _Tp>
0295 _LIBCPP_HIDE_FROM_ABI constexpr bool operator!=(nullptr_t, const propagate_const<_Tp>& __pt) {
0296   return nullptr != experimental::get_underlying(__pt);
0297 }
0298 
0299 template <class _Tp, class _Up>
0300 _LIBCPP_HIDE_FROM_ABI constexpr bool operator==(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) {
0301   return experimental::get_underlying(__pt) == experimental::get_underlying(__pu);
0302 }
0303 
0304 template <class _Tp, class _Up>
0305 _LIBCPP_HIDE_FROM_ABI constexpr bool operator!=(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) {
0306   return experimental::get_underlying(__pt) != experimental::get_underlying(__pu);
0307 }
0308 
0309 template <class _Tp, class _Up>
0310 _LIBCPP_HIDE_FROM_ABI constexpr bool operator<(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) {
0311   return experimental::get_underlying(__pt) < experimental::get_underlying(__pu);
0312 }
0313 
0314 template <class _Tp, class _Up>
0315 _LIBCPP_HIDE_FROM_ABI constexpr bool operator>(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) {
0316   return experimental::get_underlying(__pt) > experimental::get_underlying(__pu);
0317 }
0318 
0319 template <class _Tp, class _Up>
0320 _LIBCPP_HIDE_FROM_ABI constexpr bool operator<=(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) {
0321   return experimental::get_underlying(__pt) <= experimental::get_underlying(__pu);
0322 }
0323 
0324 template <class _Tp, class _Up>
0325 _LIBCPP_HIDE_FROM_ABI constexpr bool operator>=(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) {
0326   return experimental::get_underlying(__pt) >= experimental::get_underlying(__pu);
0327 }
0328 
0329 template <class _Tp, class _Up>
0330 _LIBCPP_HIDE_FROM_ABI constexpr bool operator==(const propagate_const<_Tp>& __pt, const _Up& __u) {
0331   return experimental::get_underlying(__pt) == __u;
0332 }
0333 
0334 template <class _Tp, class _Up>
0335 _LIBCPP_HIDE_FROM_ABI constexpr bool operator!=(const propagate_const<_Tp>& __pt, const _Up& __u) {
0336   return experimental::get_underlying(__pt) != __u;
0337 }
0338 
0339 template <class _Tp, class _Up>
0340 _LIBCPP_HIDE_FROM_ABI constexpr bool operator<(const propagate_const<_Tp>& __pt, const _Up& __u) {
0341   return experimental::get_underlying(__pt) < __u;
0342 }
0343 
0344 template <class _Tp, class _Up>
0345 _LIBCPP_HIDE_FROM_ABI constexpr bool operator>(const propagate_const<_Tp>& __pt, const _Up& __u) {
0346   return experimental::get_underlying(__pt) > __u;
0347 }
0348 
0349 template <class _Tp, class _Up>
0350 _LIBCPP_HIDE_FROM_ABI constexpr bool operator<=(const propagate_const<_Tp>& __pt, const _Up& __u) {
0351   return experimental::get_underlying(__pt) <= __u;
0352 }
0353 
0354 template <class _Tp, class _Up>
0355 _LIBCPP_HIDE_FROM_ABI constexpr bool operator>=(const propagate_const<_Tp>& __pt, const _Up& __u) {
0356   return experimental::get_underlying(__pt) >= __u;
0357 }
0358 
0359 template <class _Tp, class _Up>
0360 _LIBCPP_HIDE_FROM_ABI constexpr bool operator==(const _Tp& __t, const propagate_const<_Up>& __pu) {
0361   return __t == experimental::get_underlying(__pu);
0362 }
0363 
0364 template <class _Tp, class _Up>
0365 _LIBCPP_HIDE_FROM_ABI constexpr bool operator!=(const _Tp& __t, const propagate_const<_Up>& __pu) {
0366   return __t != experimental::get_underlying(__pu);
0367 }
0368 
0369 template <class _Tp, class _Up>
0370 _LIBCPP_HIDE_FROM_ABI constexpr bool operator<(const _Tp& __t, const propagate_const<_Up>& __pu) {
0371   return __t < experimental::get_underlying(__pu);
0372 }
0373 
0374 template <class _Tp, class _Up>
0375 _LIBCPP_HIDE_FROM_ABI constexpr bool operator>(const _Tp& __t, const propagate_const<_Up>& __pu) {
0376   return __t > experimental::get_underlying(__pu);
0377 }
0378 
0379 template <class _Tp, class _Up>
0380 _LIBCPP_HIDE_FROM_ABI constexpr bool operator<=(const _Tp& __t, const propagate_const<_Up>& __pu) {
0381   return __t <= experimental::get_underlying(__pu);
0382 }
0383 
0384 template <class _Tp, class _Up>
0385 _LIBCPP_HIDE_FROM_ABI constexpr bool operator>=(const _Tp& __t, const propagate_const<_Up>& __pu) {
0386   return __t >= experimental::get_underlying(__pu);
0387 }
0388 
0389 template <class _Tp>
0390 _LIBCPP_HIDE_FROM_ABI constexpr void
0391 swap(propagate_const<_Tp>& __pc1, propagate_const<_Tp>& __pc2) noexcept(__is_nothrow_swappable_v<_Tp>) {
0392   __pc1.swap(__pc2);
0393 }
0394 
0395 template <class _Tp>
0396 constexpr const _Tp& get_underlying(const propagate_const<_Tp>& __pt) _NOEXCEPT {
0397   return __pt.__t_;
0398 }
0399 
0400 template <class _Tp>
0401 constexpr _Tp& get_underlying(propagate_const<_Tp>& __pt) _NOEXCEPT {
0402   return __pt.__t_;
0403 }
0404 
0405 _LIBCPP_END_NAMESPACE_LFTS_V2
0406 
0407 _LIBCPP_BEGIN_NAMESPACE_STD
0408 
0409 template <class _Tp>
0410 struct hash<experimental::propagate_const<_Tp>> {
0411   typedef size_t result_type;
0412   typedef experimental::propagate_const<_Tp> argument_type;
0413 
0414   _LIBCPP_HIDE_FROM_ABI size_t operator()(const experimental::propagate_const<_Tp>& __pc1) const {
0415     return std::hash<_Tp>()(experimental::get_underlying(__pc1));
0416   }
0417 };
0418 
0419 template <class _Tp>
0420 struct equal_to<experimental::propagate_const<_Tp>> {
0421   typedef experimental::propagate_const<_Tp> first_argument_type;
0422   typedef experimental::propagate_const<_Tp> second_argument_type;
0423 
0424   _LIBCPP_HIDE_FROM_ABI bool
0425   operator()(const experimental::propagate_const<_Tp>& __pc1, const experimental::propagate_const<_Tp>& __pc2) const {
0426     return std::equal_to<_Tp>()(experimental::get_underlying(__pc1), experimental::get_underlying(__pc2));
0427   }
0428 };
0429 
0430 template <class _Tp>
0431 struct not_equal_to<experimental::propagate_const<_Tp>> {
0432   typedef experimental::propagate_const<_Tp> first_argument_type;
0433   typedef experimental::propagate_const<_Tp> second_argument_type;
0434 
0435   _LIBCPP_HIDE_FROM_ABI bool
0436   operator()(const experimental::propagate_const<_Tp>& __pc1, const experimental::propagate_const<_Tp>& __pc2) const {
0437     return std::not_equal_to<_Tp>()(experimental::get_underlying(__pc1), experimental::get_underlying(__pc2));
0438   }
0439 };
0440 
0441 template <class _Tp>
0442 struct less<experimental::propagate_const<_Tp>> {
0443   typedef experimental::propagate_const<_Tp> first_argument_type;
0444   typedef experimental::propagate_const<_Tp> second_argument_type;
0445 
0446   _LIBCPP_HIDE_FROM_ABI bool
0447   operator()(const experimental::propagate_const<_Tp>& __pc1, const experimental::propagate_const<_Tp>& __pc2) const {
0448     return std::less<_Tp>()(experimental::get_underlying(__pc1), experimental::get_underlying(__pc2));
0449   }
0450 };
0451 
0452 template <class _Tp>
0453 struct greater<experimental::propagate_const<_Tp>> {
0454   typedef experimental::propagate_const<_Tp> first_argument_type;
0455   typedef experimental::propagate_const<_Tp> second_argument_type;
0456 
0457   _LIBCPP_HIDE_FROM_ABI bool
0458   operator()(const experimental::propagate_const<_Tp>& __pc1, const experimental::propagate_const<_Tp>& __pc2) const {
0459     return std::greater<_Tp>()(experimental::get_underlying(__pc1), experimental::get_underlying(__pc2));
0460   }
0461 };
0462 
0463 template <class _Tp>
0464 struct less_equal<experimental::propagate_const<_Tp>> {
0465   typedef experimental::propagate_const<_Tp> first_argument_type;
0466   typedef experimental::propagate_const<_Tp> second_argument_type;
0467 
0468   _LIBCPP_HIDE_FROM_ABI bool
0469   operator()(const experimental::propagate_const<_Tp>& __pc1, const experimental::propagate_const<_Tp>& __pc2) const {
0470     return std::less_equal<_Tp>()(experimental::get_underlying(__pc1), experimental::get_underlying(__pc2));
0471   }
0472 };
0473 
0474 template <class _Tp>
0475 struct greater_equal<experimental::propagate_const<_Tp>> {
0476   typedef experimental::propagate_const<_Tp> first_argument_type;
0477   typedef experimental::propagate_const<_Tp> second_argument_type;
0478 
0479   _LIBCPP_HIDE_FROM_ABI bool
0480   operator()(const experimental::propagate_const<_Tp>& __pc1, const experimental::propagate_const<_Tp>& __pc2) const {
0481     return std::greater_equal<_Tp>()(experimental::get_underlying(__pc1), experimental::get_underlying(__pc2));
0482   }
0483 };
0484 
0485 _LIBCPP_END_NAMESPACE_STD
0486 
0487 #  endif // _LIBCPP_STD_VER >= 14
0488 
0489 _LIBCPP_POP_MACROS
0490 
0491 #  if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
0492 #    include <cstddef>
0493 #    include <type_traits>
0494 #  endif
0495 #endif // __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
0496 
0497 #endif // _LIBCPP_EXPERIMENTAL_PROPAGATE_CONST