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

Classes

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

Macros

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

Functions

template<std::size_t I, typename ... Ts, requires = (I < sizeof...(Ts))>
constexpr auto ranges::v3::get (common_tuple< Ts... > &ct) noexcept(noexcept(decltype(std::get< I >(ct.base()))(std::get< I >(ct.base())))) -> decltype(std::get< I >(ct.base()))
 
template<std::size_t I, typename ... Ts, requires = (I < sizeof...(Ts))>
constexpr auto ranges::v3::get (common_tuple< Ts... > const &ct) noexcept(noexcept(decltype(std::get< I >(ct.base()))(std::get< I >(ct.base())))) -> decltype(std::get< I >(ct.base()))
 
template<std::size_t I, typename ... Ts, requires = (I < sizeof...(Ts))>
constexpr auto ranges::v3::get (common_tuple< Ts... > &&ct) noexcept(noexcept(decltype(std::get< I >(std::move(ct.base())))(std::get< I >(std::move(ct.base()))))) -> decltype(std::get< I >(std::move(ct.base())))
 
template<std::size_t I, typename ... Ts, requires = (I < sizeof...(Ts))>
void ranges::v3::get (common_tuple< Ts... > const &&ct)=delete
 
template<typename T , typename ... Ts>
constexpr auto ranges::v3::get (common_tuple< Ts... > &ct) noexcept(noexcept(decltype(std::get< T >(ct.base()))(std::get< T >(ct.base())))) -> decltype(std::get< T >(ct.base()))
 
template<typename T , typename ... Ts>
constexpr auto ranges::v3::get (common_tuple< Ts... > const &ct) noexcept(noexcept(decltype(std::get< T >(ct.base()))(std::get< T >(ct.base())))) -> decltype(std::get< T >(ct.base()))
 
template<typename T , typename ... Ts>
constexpr auto ranges::v3::get (common_tuple< Ts... > &&ct) noexcept(noexcept(decltype(std::get< T >(std::move(ct.base())))(std::get< T >(std::move(ct.base()))))) -> decltype(std::get< T >(std::move(ct.base())))
 
template<typename T , typename ... Ts>
void ranges::v3::get (common_tuple< Ts... > const &&ct)=delete
 
template<typename... Ts, typename... Us, requires = (meta::and_c<(bool) EqualityComparable <Ts, Us>()...>::value)>
bool ranges::v3::operator!= (common_tuple< Ts... > const &a, common_tuple< Us... > const &b)
 
template<typename... Ts, typename... Us, requires = (meta::and_c<(bool) EqualityComparable <Ts, Us>()...>::value)>
bool ranges::v3::operator!= (std::tuple< Ts... > const &a, common_tuple< Us... > const &b)
 
template<typename... Ts, typename... Us, requires = (meta::and_c<(bool) EqualityComparable <Ts, Us>()...>::value)>
bool ranges::v3::operator!= (common_tuple< Ts... > const &a, std::tuple< Us... > const &b)
 
template<typename F1 , typename S1 , typename F2 , typename S2 , requires = ( EqualityComparable <F1, F2>() && EqualityComparable <S1, S2>())>
bool ranges::v3::operator!= (common_pair< F1, S1 > const &a, common_pair< F2, S2 > const &b)
 
template<typename F1 , typename S1 , typename F2 , typename S2 , requires = ( EqualityComparable <F1, F2>() && EqualityComparable <S1, S2>())>
bool ranges::v3::operator!= (std::pair< F1, S1 > const &a, common_pair< F2, S2 > const &b)
 
template<typename F1 , typename S1 , typename F2 , typename S2 , requires = ( EqualityComparable <F1, F2>() && EqualityComparable <S1, S2>())>
bool ranges::v3::operator!= (common_pair< F1, S1 > const &a, std::pair< F2, S2 > const &b)
 
template<typename... Ts, typename... Us, requires = (meta::and_c<(bool) TotallyOrdered <Ts, Us>()...>::value)>
bool ranges::v3::operator< (std::tuple< Ts... > const &a, common_tuple< Us... > const &b)
 
template<typename... Ts, typename... Us, requires = (meta::and_c<(bool) TotallyOrdered <Ts, Us>()...>::value)>
bool ranges::v3::operator< (common_tuple< Ts... > const &a, std::tuple< Us... > const &b)
 
template<typename... Ts, typename... Us, requires = (meta::and_c<(bool) TotallyOrdered <Ts, Us>()...>::value)>
bool ranges::v3::operator< (common_tuple< Ts... > const &a, common_tuple< Us... > const &b)
 
template<typename F1 , typename S1 , typename F2 , typename S2 , requires = (TotallyOrdered<F1, F2>() && TotallyOrdered<S1, S2>())>
bool ranges::v3::operator< (common_pair< F1, S1 > const &a, common_pair< F2, S2 > const &b)
 
template<typename F1 , typename S1 , typename F2 , typename S2 , requires = (TotallyOrdered<F1, F2>() && TotallyOrdered<S1, S2>())>
bool ranges::v3::operator< (std::pair< F1, S1 > const &a, common_pair< F2, S2 > const &b)
 
template<typename F1 , typename S1 , typename F2 , typename S2 , requires = (TotallyOrdered<F1, F2>() && TotallyOrdered<S1, S2>())>
bool ranges::v3::operator< (common_pair< F1, S1 > const &a, std::pair< F2, S2 > const &b)
 
template<typename... Ts, typename... Us, requires = (meta::and_c<(bool) TotallyOrdered <Ts, Us>()...>::value)>
bool ranges::v3::operator<= (common_tuple< Ts... > const &a, common_tuple< Us... > const &b)
 
template<typename... Ts, typename... Us, requires = (meta::and_c<(bool) TotallyOrdered <Ts, Us>()...>::value)>
bool ranges::v3::operator<= (std::tuple< Ts... > const &a, common_tuple< Us... > const &b)
 
template<typename... Ts, typename... Us, requires = (meta::and_c<(bool) TotallyOrdered <Ts, Us>()...>::value)>
bool ranges::v3::operator<= (common_tuple< Ts... > const &a, std::tuple< Us... > const &b)
 
template<typename F1 , typename S1 , typename F2 , typename S2 , requires = ( TotallyOrdered <F1, F2>() && TotallyOrdered <S1, S2>())>
bool ranges::v3::operator<= (common_pair< F1, S1 > const &a, std::pair< F2, S2 > const &b)
 
template<typename F1 , typename S1 , typename F2 , typename S2 , requires = ( TotallyOrdered <F1, F2>() && TotallyOrdered <S1, S2>())>
bool ranges::v3::operator<= (common_pair< F1, S1 > const &a, common_pair< F2, S2 > const &b)
 
template<typename F1 , typename S1 , typename F2 , typename S2 , requires = ( TotallyOrdered <F1, F2>() && TotallyOrdered <S1, S2>())>
bool ranges::v3::operator<= (std::pair< F1, S1 > const &a, common_pair< F2, S2 > const &b)
 
template<typename... Ts, typename... Us, requires = (meta::and_c<(bool) EqualityComparable <Ts, Us>()...>::value)>
bool ranges::v3::operator== (common_tuple< Ts... > const &a, common_tuple< Us... > const &b)
 
template<typename... Ts, typename... Us, requires = (meta::and_c<(bool) EqualityComparable <Ts, Us>()...>::value)>
bool ranges::v3::operator== (std::tuple< Ts... > const &a, common_tuple< Us... > const &b)
 
template<typename... Ts, typename... Us, requires = (meta::and_c<(bool) EqualityComparable <Ts, Us>()...>::value)>
bool ranges::v3::operator== (common_tuple< Ts... > const &a, std::tuple< Us... > const &b)
 
template<typename F1 , typename S1 , typename F2 , typename S2 , requires = (EqualityComparable<F1, F2>() && EqualityComparable<S1, S2>())>
bool ranges::v3::operator== (common_pair< F1, S1 > const &a, common_pair< F2, S2 > const &b)
 
template<typename F1 , typename S1 , typename F2 , typename S2 , requires = (EqualityComparable<F1, F2>() && EqualityComparable<S1, S2>())>
bool ranges::v3::operator== (common_pair< F1, S1 > const &a, std::pair< F2, S2 > const &b)
 
template<typename F1 , typename S1 , typename F2 , typename S2 , requires = (EqualityComparable<F1, F2>() && EqualityComparable<S1, S2>())>
bool ranges::v3::operator== (std::pair< F1, S1 > const &a, common_pair< F2, S2 > const &b)
 
template<typename... Ts, typename... Us, requires = (meta::and_c<(bool) TotallyOrdered <Ts, Us>()...>::value)>
bool ranges::v3::operator> (std::tuple< Ts... > const &a, common_tuple< Us... > const &b)
 
template<typename... Ts, typename... Us, requires = (meta::and_c<(bool) TotallyOrdered <Ts, Us>()...>::value)>
bool ranges::v3::operator> (common_tuple< Ts... > const &a, std::tuple< Us... > const &b)
 
template<typename... Ts, typename... Us, requires = (meta::and_c<(bool) TotallyOrdered <Ts, Us>()...>::value)>
bool ranges::v3::operator> (common_tuple< Ts... > const &a, common_tuple< Us... > const &b)
 
template<typename F1 , typename S1 , typename F2 , typename S2 , requires = ( TotallyOrdered <F1, F2>() && TotallyOrdered <S1, S2>())>
bool ranges::v3::operator> (common_pair< F1, S1 > const &a, std::pair< F2, S2 > const &b)
 
template<typename F1 , typename S1 , typename F2 , typename S2 , requires = ( TotallyOrdered <F1, F2>() && TotallyOrdered <S1, S2>())>
bool ranges::v3::operator> (std::pair< F1, S1 > const &a, common_pair< F2, S2 > const &b)
 
template<typename F1 , typename S1 , typename F2 , typename S2 , requires = ( TotallyOrdered <F1, F2>() && TotallyOrdered <S1, S2>())>
bool ranges::v3::operator> (common_pair< F1, S1 > const &a, common_pair< F2, S2 > const &b)
 
template<typename... Ts, typename... Us, requires = (meta::and_c<(bool) TotallyOrdered <Ts, Us>()...>::value)>
bool ranges::v3::operator>= (common_tuple< Ts... > const &a, std::tuple< Us... > const &b)
 
template<typename... Ts, typename... Us, requires = (meta::and_c<(bool) TotallyOrdered <Ts, Us>()...>::value)>
bool ranges::v3::operator>= (common_tuple< Ts... > const &a, common_tuple< Us... > const &b)
 
template<typename... Ts, typename... Us, requires = (meta::and_c<(bool) TotallyOrdered <Ts, Us>()...>::value)>
bool ranges::v3::operator>= (std::tuple< Ts... > const &a, common_tuple< Us... > const &b)
 
template<typename F1 , typename S1 , typename F2 , typename S2 , requires = ( TotallyOrdered <F1, F2>() && TotallyOrdered <S1, S2>())>
bool ranges::v3::operator>= (std::pair< F1, S1 > const &a, common_pair< F2, S2 > const &b)
 
template<typename F1 , typename S1 , typename F2 , typename S2 , requires = ( TotallyOrdered <F1, F2>() && TotallyOrdered <S1, S2>())>
bool ranges::v3::operator>= (common_pair< F1, S1 > const &a, common_pair< F2, S2 > const &b)
 
template<typename F1 , typename S1 , typename F2 , typename S2 , requires = ( TotallyOrdered <F1, F2>() && TotallyOrdered <S1, S2>())>
bool ranges::v3::operator>= (common_pair< F1, S1 > const &a, std::pair< F2, S2 > const &b)
 

Variables

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

Macro Definition Documentation

◆ LOGICAL_OP [1/2]

#define LOGICAL_OP (   OP,
  CONCEPT 
)
Value:
template<typename...Ts, typename...Us,\
CONCEPT_REQUIRES_(meta::and_c<(bool) CONCEPT<Ts, Us>()...>::value)>\
bool operator OP(common_tuple<Ts...> const &a, common_tuple<Us...> const &b)\
{\
return a.base() OP b.base();\
}\
template<typename...Ts, typename...Us,\
CONCEPT_REQUIRES_(meta::and_c<(bool) CONCEPT<Ts, Us>()...>::value)>\
bool operator OP(std::tuple<Ts...> const &a, common_tuple<Us...> const &b)\
{\
return a OP b.base();\
}\
template<typename...Ts, typename...Us,\
CONCEPT_REQUIRES_(meta::and_c<(bool) CONCEPT<Ts, Us>()...>::value)>\
bool operator OP(common_tuple<Ts...> const &a, std::tuple<Us...> const &b)\
{\
return a.base() OP b;\
}\
std::is_same< integer_sequence< bool, Bools... >, integer_sequence< bool,(Bools||true)... > > and_c
Logically and together all the Boolean parameters.
Definition: meta.hpp:1209

◆ LOGICAL_OP [2/2]

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