Autoware.Auto
|
|
A trait used to intersect types stored in tuples at compile time. The resulting typedef type
will hold a tuple with the intersection of the types provided in the input tuples.
More...
#include <type_traits.hpp>
Public Types | |
using | type = decltype(make_intersection(std::make_index_sequence< std::tuple_size< TupleT1 >::value > {})) |
The resulting tuple type. More... | |
Static Public Member Functions | |
template<std::size_t... Indices> | |
static constexpr auto | make_intersection (std::index_sequence< Indices... >) |
Intersect the types. More... | |
A trait used to intersect types stored in tuples at compile time. The resulting typedef type
will hold a tuple with the intersection of the types provided in the input tuples.
Taken from https://stackoverflow.com/a/41200732/1763680
TupleT1 | Tuple 1 |
TupleT2 | Tuple 2 |
using autoware::common::type_traits::intersect< TupleT1, TupleT2 >::type = decltype(make_intersection(std::make_index_sequence<std::tuple_size<TupleT1>::value> {})) |
The resulting tuple type.
|
inlinestaticconstexpr |
Intersect the types.
This function "iterates" over the types in TupleT1 and checks if those are in TupleT2. If this is true, these types are concatenated into a new tuple.