45 #ifndef __has_attribute 46 #define PUSHMI_HAS_ATTRIBUTE(x) 0 48 #define PUSHMI_HAS_ATTRIBUTE(x) __has_attribute(x) 51 #ifndef __has_cpp_attribute 52 #define PUSHMI_HAS_CPP_ATTRIBUTE(x) 0 54 #define PUSHMI_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x) 57 #if PUSHMI_HAS_CPP_ATTRIBUTE(maybe_unused) 58 #define PUSHMI_MAYBE_UNUSED [[maybe_unused]] 59 #elif PUSHMI_HAS_ATTRIBUTE(__unused__) || __GNUC__ 60 #define PUSHMI_MAYBE_UNUSED __attribute__((__unused__)) 62 #define PUSHMI_MAYBE_UNUSED 67 #if defined(__clang__) || (defined(__GNUC__) && __GNUC__ >= 5) 68 #define PUSHMI_PP_IGNORE_SHADOW_BEGIN \ 69 _Pragma("GCC diagnostic push") \ 70 _Pragma("GCC diagnostic ignored \"-Wshadow\"") \ 72 #define PUSHMI_PP_IGNORE_SHADOW_END \ 73 _Pragma("GCC diagnostic pop") 76 #define PUSHMI_PP_IGNORE_SHADOW_BEGIN 77 #define PUSHMI_PP_IGNORE_SHADOW_END 80 #define PUSHMI_COMMA , 82 #define PUSHMI_EVAL(F, ...) F(__VA_ARGS__) 84 #define PUSHMI_STRIP(...) __VA_ARGS__ 102 #if __cpp_if_constexpr >= 201606 104 #define PUSHMI_IF_CONSTEXPR(LIST) \ 105 if constexpr (::folly::pushmi::detail::id_fn id = {}) { \ 106 } else if constexpr \ 107 PUSHMI_EVAL(PUSHMI_IF_CONSTEXPR_ELSE_, PUSHMI_IF_CONSTEXPR_IF_ LIST) 109 #define PUSHMI_IF_CONSTEXPR_RETURN(LIST)\ 110 PUSHMI_PP_IGNORE_SHADOW_BEGIN \ 111 PUSHMI_IF_CONSTEXPR(LIST)\ 112 PUSHMI_PP_IGNORE_SHADOW_END \ 115 #define PUSHMI_IF_CONSTEXPR_IF_(...) \ 116 (__VA_ARGS__) PUSHMI_COMMA PUSHMI_IF_CONSTEXPR_THEN_ 118 #define PUSHMI_IF_CONSTEXPR_THEN_(...) \ 119 ({__VA_ARGS__}) PUSHMI_COMMA 121 #define PUSHMI_IF_CONSTEXPR_ELSE_(A, B, C) \ 122 A PUSHMI_STRIP B PUSHMI_IF_CONSTEXPR_ ## C 124 #define PUSHMI_IF_CONSTEXPR_else(...) \ 129 #include <type_traits> 131 #define PUSHMI_IF_CONSTEXPR(LIST)\ 132 PUSHMI_EVAL(PUSHMI_IF_CONSTEXPR_ELSE_, PUSHMI_IF_CONSTEXPR_IF_ LIST)\ 135 #define PUSHMI_IF_CONSTEXPR_RETURN(LIST)\ 136 return PUSHMI_EVAL(PUSHMI_IF_CONSTEXPR_ELSE_, PUSHMI_IF_CONSTEXPR_IF_ LIST)\ 139 #define PUSHMI_IF_CONSTEXPR_IF_(...) \ 140 (::folly::pushmi::detail::select<bool(__VA_ARGS__)>() ->* PUSHMI_IF_CONSTEXPR_THEN_ \ 143 #define PUSHMI_IF_CONSTEXPR_THEN_(...) \ 144 ([&](PUSHMI_MAYBE_UNUSED auto id)mutable->decltype(auto){__VA_ARGS__})) PUSHMI_COMMA \ 147 #define PUSHMI_IF_CONSTEXPR_ELSE_(A, B) \ 148 A ->* PUSHMI_IF_CONSTEXPR_ ## B \ 151 #define PUSHMI_IF_CONSTEXPR_else(...) \ 152 ([&](PUSHMI_MAYBE_UNUSED auto id)mutable->decltype(auto){__VA_ARGS__});\ 166 return static_cast<R&&
>(value_);
constexpr auto operator->*(T &&t) -> eat_return< decltype(t(::folly::pushmi::detail::id_fn
—— Concurrent Priority Queue Implementation ——
requires E e noexcept(noexcept(s.error(std::move(e))))
constexpr T && operator()(T &&t) const noexcept
constexpr auto operator->*(T &&t) const -> eat
static const char *const value
constexpr auto operator->*(T &&t) -> decltype(auto)
constexpr R operator->*(T &&)
constexpr void operator->*(T &&)
constexpr eat operator->*(T &&)