20 #include <type_traits> 28 template <
typename Po
inter>
31 template <
typename Po
inter>
36 template <
typename Po
inter>
44 template <
typename Po
inter>
49 namespace propagate_const_adl {
60 template <
typename Po
inter>
71 typename OtherPointer,
77 : pointer_(static_cast<OtherPointer&&>(other.pointer_)) {}
80 typename OtherPointer,
86 : pointer_(static_cast<OtherPointer&&>(other.pointer_)) {}
89 typename OtherPointer,
93 !std::is_convertible<OtherPointer&&, Pointer>::value,
96 : pointer_(static_cast<OtherPointer&&>(other)) {}
99 typename OtherPointer,
103 std::is_convertible<OtherPointer&&, Pointer>::value,
106 : pointer_(static_cast<OtherPointer&&>(other)) {}
112 typename OtherPointer,
117 pointer_ =
static_cast<OtherPointer&&
>(other.pointer_);
121 typename OtherPointer,
122 typename =
_t<std::enable_if<
124 std::is_convertible<OtherPointer&&, Pointer>::value>>>
126 pointer_ =
static_cast<OtherPointer&&
>(other);
132 std::declval<Pointer&>(),
138 return get_(pointer_);
142 return get_(pointer_);
145 constexpr
explicit operator bool()
const {
146 return static_cast<bool>(pointer_);
166 typename OtherPointer = Pointer,
167 typename =
_t<std::enable_if<
175 typename OtherPointer = Pointer,
176 typename =
_t<std::enable_if<
186 template <
typename OtherPo
inter>
189 template <
typename T>
193 template <
typename T>
194 constexpr
static auto get_(
T&
t) -> decltype(
t.get()) {
201 template <
typename Po
inter>
208 template <
typename Po
inter>
213 template <
typename Po
inter>
218 template <
typename Po
inter>
223 template <
typename Po
inter>
228 template <
typename Po
inter>
235 template <
typename Po
inter>
242 template <
typename Po
inter>
249 template <
typename Po
inter>
256 template <
typename Po
inter>
263 template <
typename Po
inter>
275 template <
typename Po
inter,
typename Other>
281 template <
typename Po
inter,
typename Other>
287 template <
typename Po
inter,
typename Other>
288 constexpr
auto operator<(propagate_const<Pointer>
const&
a, Other
const&
b)
293 template <
typename Po
inter,
typename Other>
294 constexpr
auto operator<=(propagate_const<Pointer>
const&
a, Other
const&
b)
299 template <
typename Po
inter,
typename Other>
305 template <
typename Po
inter,
typename Other>
311 template <
typename Other,
typename Po
inter>
317 template <
typename Other,
typename Po
inter>
323 template <
typename Other,
typename Po
inter>
324 constexpr
auto operator<(Other const& a, propagate_const<Pointer>
const&
b)
329 template <
typename Other,
typename Po
inter>
330 constexpr
auto operator<=(Other const& a, propagate_const<Pointer>
const&
b)
335 template <
typename Other,
typename Po
inter>
341 template <
typename Other,
typename Po
inter>
351 template <
typename Po
inter>
352 struct hash<
folly::propagate_const<Pointer>> :
private hash<Pointer> {
353 using hash<Pointer>::hash;
360 template <
typename Po
inter>
361 struct equal_to<
folly::propagate_const<Pointer>> :
private equal_to<Pointer> {
362 using equal_to<Pointer>::equal_to;
367 return equal_to<Pointer>::operator()(
372 template <
typename Po
inter>
373 struct not_equal_to<
folly::propagate_const<Pointer>>
374 :
private not_equal_to<Pointer> {
375 using not_equal_to<Pointer>::not_equal_to;
380 return not_equal_to<Pointer>::operator()(
385 template <
typename Po
inter>
386 struct less<
folly::propagate_const<Pointer>> :
private less<Pointer> {
387 using less<Pointer>::less;
392 return less<Pointer>::operator()(
397 template <
typename Po
inter>
398 struct greater<
folly::propagate_const<Pointer>> :
private greater<Pointer> {
399 using greater<Pointer>::greater;
404 return greater<Pointer>::operator()(
409 template <
typename Po
inter>
410 struct less_equal<
folly::propagate_const<Pointer>>
411 :
private less_equal<Pointer> {
412 using less_equal<Pointer>::less_equal;
417 return less_equal<Pointer>::operator()(
422 template <
typename Po
inter>
423 struct greater_equal<
folly::propagate_const<Pointer>>
424 :
private greater_equal<Pointer> {
425 using greater_equal<Pointer>::greater_equal;
430 return greater_equal<Pointer>::operator()(
bool operator>(const Expected< Value, Error > &lhs, const Expected< Value, Error > &rhs)
constexpr propagate_const(OtherPointer &&other)
constexpr element_type const & operator*() const
constexpr bool operator()(folly::propagate_const< Pointer > const &a, folly::propagate_const< Pointer > const &b)
_t< std::remove_reference< decltype(*std::declval< Pointer & >())>> element_type
#define FOLLY_CPP14_CONSTEXPR
constexpr bool operator()(folly::propagate_const< Pointer > const &a, folly::propagate_const< Pointer > const &b)
static constexpr auto get_(T &t) -> decltype(t.get())
constexpr bool operator()(folly::propagate_const< Pointer > const &a, folly::propagate_const< Pointer > const &b)
constexpr bool operator()(folly::propagate_const< Pointer > const &a, folly::propagate_const< Pointer > const &b)
—— Concurrent Priority Queue Implementation ——
constexpr element_type const * operator->() const
requires E e noexcept(noexcept(s.error(std::move(e))))
FOLLY_CPP14_CONSTEXPR element_type & operator*()
static constexpr T * get_(T *t)
constexpr propagate_const(propagate_const< OtherPointer > &&other)
bool_constant< true > true_type
bool operator!=(const Unexpected< Error > &lhs, const Unexpected< Error > &rhs)
FOLLY_CPP14_CONSTEXPR void swap(propagate_const &other) noexcept(noexcept(detail::propagate_const_adl::adl_swap(std::declval< Pointer & >(), other.pointer_)))
size_t operator()(folly::propagate_const< Pointer > const &obj) const
FOLLY_CPP14_CONSTEXPR void swap(propagate_const< Pointer > &a, propagate_const< Pointer > &b) noexcept(noexcept(a.swap(b)))
FOLLY_CPP14_CONSTEXPR element_type * operator->()
static const char *const value
constexpr bool operator()(folly::propagate_const< Pointer > const &a, folly::propagate_const< Pointer > const &b)
FOLLY_CPP14_CONSTEXPR propagate_const & operator=(propagate_const< OtherPointer > &&other)
bool operator>=(const Expected< Value, Error > &lhs, const Expected< Value, Error > &rhs)
void swap(exception_wrapper &a, exception_wrapper &b) noexcept
auto adl_swap(T &a, T &b) noexcept(noexcept(swap(a, b))) -> decltype(swap(a, b))
bool operator==(const Unexpected< Error > &lhs, const Unexpected< Error > &rhs)
constexpr Pointer & get_underlying(propagate_const< Pointer > &obj)
bool operator<=(const Expected< Value, Error > &lhs, const Expected< Value, Error > &rhs)
bool_constant< false > false_type
constexpr bool operator()(folly::propagate_const< Pointer > const &a, folly::propagate_const< Pointer > const &b)
FOLLY_CPP14_CONSTEXPR propagate_const & operator=(OtherPointer &&other)
std::enable_if< IsLessThanComparable< Value >::value, bool >::type operator<(const Expected< Value, Error > &lhs, const Expected< Value, Error > &rhs)