KaMPIng 0.1.1
Flexible and (near) zero-overhead C++ bindings for MPI
Loading...
Searching...
No Matches
kamping::is_pair_like< T > Struct Template Reference

A type trait that checks if a type T is a pair-like type, i.e., it may be destructured using std::get<0> and std::get<1> and has a size of 2. More...

#include <traits.hpp>

Static Public Member Functions

template<typename S >
static auto test (int) -> decltype(std::integral_constant< size_t, std::tuple_size< S >::value >{})
 Only enable this overload if std::tuple_size is defined for S.
 
template<typename >
static auto test (...) -> std::integral_constant< size_t, 0 >
 Fallback overload, returns size 0.
 

Static Public Attributes

static constexpr bool value = decltype(test<T>(0))::value == 2
 The value of the trait.
 

Detailed Description

template<typename T>
struct kamping::is_pair_like< T >

A type trait that checks if a type T is a pair-like type, i.e., it may be destructured using std::get<0> and std::get<1> and has a size of 2.


The documentation for this struct was generated from the following file: