Range-v3
Range algorithms, views, and actions for the Standard Library
common_tuple.hpp File Reference

Classes

struct  ranges::common_pair< F, S >
 
struct  ranges::common_tuple< Ts >
 
struct  ranges::make_common_pair_fn
 
struct  ranges::make_common_tuple_fn
 
struct  std::tuple_element< 0, ::ranges::common_pair< First, Second > >
 
struct  std::tuple_element< 1, ::ranges::common_pair< First, Second > >
 
struct  std::tuple_element< N, ::ranges::common_tuple< Ts... > >
 
struct  std::tuple_size<::ranges::common_pair< First, Second > >
 
struct  std::tuple_size<::ranges::common_tuple< Ts... > >
 

Macros

#define LOGICAL_OP(OP, CONCEPT)
 
#define LOGICAL_OP(OP, CONCEPT, RET)
 

Functions

template<typename F1 , typename S1 , typename F2 , typename S2 >
auto ranges::operator!= (common_pair< F1, S1 > const &a, common_pair< F2, S2 > const &b) -> bool requires equality_comparable_with< F1, F2 > &&equality_comparable_with< S1, S2 >
 
template<typename F1 , typename S1 , typename F2 , typename S2 >
auto ranges::operator!= (common_pair< F1, S1 > const &a, std::pair< F2, S2 > const &b) -> bool requires equality_comparable_with< F1, F2 > &&equality_comparable_with< S1, S2 >
 
template<typename... Ts, typename... Us>
auto ranges::operator!= (common_tuple< Ts... > const &a, common_tuple< Us... > const &b) -> bool requires and_v< equality_comparable_with< Ts, Us >... >
 
template<typename... Ts, typename... Us>
auto ranges::operator!= (common_tuple< Ts... > const &a, std::tuple< Us... > const &b) -> bool requires and_v< equality_comparable_with< Ts, Us >... >
 
template<typename F1 , typename S1 , typename F2 , typename S2 >
auto ranges::operator!= (std::pair< F1, S1 > const &a, common_pair< F2, S2 > const &b) -> bool requires equality_comparable_with< F1, F2 > &&equality_comparable_with< S1, S2 >
 
template<typename... Ts, typename... Us>
auto ranges::operator!= (std::tuple< Ts... > const &a, common_tuple< Us... > const &b) -> bool requires and_v< equality_comparable_with< Ts, Us >... >
 
template<typename F1 , typename S1 , typename F2 , typename S2 >
auto ranges::operator< (common_pair< F1, S1 > const &a, common_pair< F2, S2 > const &b) -> bool requires totally_ordered_with< F1, F2 > &&totally_ordered_with< S1, S2 >
 
template<typename F1 , typename S1 , typename F2 , typename S2 >
auto ranges::operator< (common_pair< F1, S1 > const &a, std::pair< F2, S2 > const &b) -> bool requires totally_ordered_with< F1, F2 > &&totally_ordered_with< S1, S2 >
 
template<typename... Ts, typename... Us>
auto ranges::operator< (common_tuple< Ts... > const &a, common_tuple< Us... > const &b) -> bool requires and_v< totally_ordered_with< Ts, Us >... >
 
template<typename... Ts, typename... Us>
auto ranges::operator< (common_tuple< Ts... > const &a, std::tuple< Us... > const &b) -> bool requires and_v< totally_ordered_with< Ts, Us >... >
 
template<typename F1 , typename S1 , typename F2 , typename S2 >
auto ranges::operator< (std::pair< F1, S1 > const &a, common_pair< F2, S2 > const &b) -> bool requires totally_ordered_with< F1, F2 > &&totally_ordered_with< S1, S2 >
 
template<typename... Ts, typename... Us>
auto ranges::operator< (std::tuple< Ts... > const &a, common_tuple< Us... > const &b) -> bool requires and_v< totally_ordered_with< Ts, Us >... >
 
template<typename F1 , typename S1 , typename F2 , typename S2 >
auto ranges::operator<= (common_pair< F1, S1 > const &a, common_pair< F2, S2 > const &b) -> bool requires totally_ordered_with< F1, F2 > &&totally_ordered_with< S1, S2 >
 
template<typename F1 , typename S1 , typename F2 , typename S2 >
auto ranges::operator<= (common_pair< F1, S1 > const &a, std::pair< F2, S2 > const &b) -> bool requires totally_ordered_with< F1, F2 > &&totally_ordered_with< S1, S2 >
 
template<typename... Ts, typename... Us>
auto ranges::operator<= (common_tuple< Ts... > const &a, common_tuple< Us... > const &b) -> bool requires and_v< totally_ordered_with< Ts, Us >... >
 
template<typename... Ts, typename... Us>
auto ranges::operator<= (common_tuple< Ts... > const &a, std::tuple< Us... > const &b) -> bool requires and_v< totally_ordered_with< Ts, Us >... >
 
template<typename F1 , typename S1 , typename F2 , typename S2 >
auto ranges::operator<= (std::pair< F1, S1 > const &a, common_pair< F2, S2 > const &b) -> bool requires totally_ordered_with< F1, F2 > &&totally_ordered_with< S1, S2 >
 
template<typename... Ts, typename... Us>
auto ranges::operator<= (std::tuple< Ts... > const &a, common_tuple< Us... > const &b) -> bool requires and_v< totally_ordered_with< Ts, Us >... >
 
template<typename F1 , typename S1 , typename F2 , typename S2 >
auto ranges::operator== (common_pair< F1, S1 > const &a, common_pair< F2, S2 > const &b) -> bool requires equality_comparable_with< F1, F2 > &&equality_comparable_with< S1, S2 >
 
template<typename F1 , typename S1 , typename F2 , typename S2 >
auto ranges::operator== (common_pair< F1, S1 > const &a, std::pair< F2, S2 > const &b) -> bool requires equality_comparable_with< F1, F2 > &&equality_comparable_with< S1, S2 >
 
template<typename... Ts, typename... Us>
auto ranges::operator== (common_tuple< Ts... > const &a, common_tuple< Us... > const &b) -> bool requires and_v< equality_comparable_with< Ts, Us >... >
 
template<typename... Ts, typename... Us>
auto ranges::operator== (common_tuple< Ts... > const &a, std::tuple< Us... > const &b) -> bool requires and_v< equality_comparable_with< Ts, Us >... >
 
template<typename F1 , typename S1 , typename F2 , typename S2 >
auto ranges::operator== (std::pair< F1, S1 > const &a, common_pair< F2, S2 > const &b) -> bool requires equality_comparable_with< F1, F2 > &&equality_comparable_with< S1, S2 >
 
template<typename... Ts, typename... Us>
auto ranges::operator== (std::tuple< Ts... > const &a, common_tuple< Us... > const &b) -> bool requires and_v< equality_comparable_with< Ts, Us >... >
 
template<typename F1 , typename S1 , typename F2 , typename S2 >
auto ranges::operator> (common_pair< F1, S1 > const &a, common_pair< F2, S2 > const &b) -> bool requires totally_ordered_with< F1, F2 > &&totally_ordered_with< S1, S2 >
 
template<typename F1 , typename S1 , typename F2 , typename S2 >
auto ranges::operator> (common_pair< F1, S1 > const &a, std::pair< F2, S2 > const &b) -> bool requires totally_ordered_with< F1, F2 > &&totally_ordered_with< S1, S2 >
 
template<typename... Ts, typename... Us>
auto ranges::operator> (common_tuple< Ts... > const &a, common_tuple< Us... > const &b) -> bool requires and_v< totally_ordered_with< Ts, Us >... >
 
template<typename... Ts, typename... Us>
auto ranges::operator> (common_tuple< Ts... > const &a, std::tuple< Us... > const &b) -> bool requires and_v< totally_ordered_with< Ts, Us >... >
 
template<typename F1 , typename S1 , typename F2 , typename S2 >
auto ranges::operator> (std::pair< F1, S1 > const &a, common_pair< F2, S2 > const &b) -> bool requires totally_ordered_with< F1, F2 > &&totally_ordered_with< S1, S2 >
 
template<typename... Ts, typename... Us>
auto ranges::operator> (std::tuple< Ts... > const &a, common_tuple< Us... > const &b) -> bool requires and_v< totally_ordered_with< Ts, Us >... >
 
template<typename F1 , typename S1 , typename F2 , typename S2 >
auto ranges::operator>= (common_pair< F1, S1 > const &a, common_pair< F2, S2 > const &b) -> bool requires totally_ordered_with< F1, F2 > &&totally_ordered_with< S1, S2 >
 
template<typename F1 , typename S1 , typename F2 , typename S2 >
auto ranges::operator>= (common_pair< F1, S1 > const &a, std::pair< F2, S2 > const &b) -> bool requires totally_ordered_with< F1, F2 > &&totally_ordered_with< S1, S2 >
 
template<typename... Ts, typename... Us>
auto ranges::operator>= (common_tuple< Ts... > const &a, common_tuple< Us... > const &b) -> bool requires and_v< totally_ordered_with< Ts, Us >... >
 
template<typename... Ts, typename... Us>
auto ranges::operator>= (common_tuple< Ts... > const &a, std::tuple< Us... > const &b) -> bool requires and_v< totally_ordered_with< Ts, Us >... >
 
template<typename F1 , typename S1 , typename F2 , typename S2 >
auto ranges::operator>= (std::pair< F1, S1 > const &a, common_pair< F2, S2 > const &b) -> bool requires totally_ordered_with< F1, F2 > &&totally_ordered_with< S1, S2 >
 
template<typename... Ts, typename... Us>
auto ranges::operator>= (std::tuple< Ts... > const &a, common_tuple< Us... > const &b) -> bool requires and_v< totally_ordered_with< Ts, Us >... >
 

Variables

constexpr make_common_pair_fn ranges::make_common_pair {}
 
constexpr make_common_tuple_fn ranges::make_common_tuple {}
 

Macro Definition Documentation

◆ LOGICAL_OP [1/2]

#define LOGICAL_OP (   OP,
  CONCEPT 
)
Value:
template<typename... Ts, typename... Us> \
auto operator OP(common_tuple<Ts...> const & a, common_tuple<Us...> const & b) \
->CPP_ret(bool)(requires and_v<CONCEPT<Ts, Us>...>) \
{ \
return a.base() OP b.base(); \
} \
template<typename... Ts, typename... Us> \
auto operator OP(std::tuple<Ts...> const & a, common_tuple<Us...> const & b) \
->CPP_ret(bool)(requires and_v<CONCEPT<Ts, Us>...>) \
{ \
return a OP b.base(); \
} \
template<typename... Ts, typename... Us> \
auto operator OP(common_tuple<Ts...> const & a, std::tuple<Us...> const & b) \
->CPP_ret(bool)(requires and_v<CONCEPT<Ts, Us>...>) \
{ \
return a.base() OP b; \
} \

◆ LOGICAL_OP [2/2]

#define LOGICAL_OP (   OP,
  CONCEPT,
  RET 
)
Value:
template<typename F1, typename S1, typename F2, typename S2> \
auto operator OP(common_pair<F1, S1> const & a, common_pair<F2, S2> const & b) \
->CPP_ret(bool)(requires CONCEPT<F1, F2> && CONCEPT<S1, S2>) \
{ \
return RET; \
} \
template<typename F1, typename S1, typename F2, typename S2> \
auto operator OP(std::pair<F1, S1> const & a, common_pair<F2, S2> const & b) \
->CPP_ret(bool)(requires CONCEPT<F1, F2> && CONCEPT<S1, S2>) \
{ \
return RET; \
} \
template<typename F1, typename S1, typename F2, typename S2> \
auto operator OP(common_pair<F1, S1> const & a, std::pair<F2, S2> const & b) \
->CPP_ret(bool)(requires CONCEPT<F1, F2> && CONCEPT<S1, S2>) \
{ \
return RET; \
} \