|
struct | conjunction |
| A class to compute a conjunction over given traits. More...
|
|
struct | conjunction< TraitT > |
| A conjunction of another type shall derive from that type. More...
|
|
struct | conjunction< TraitT, TraitsTs... > |
|
struct | has_type |
| A trait to check if a tuple has a type. More...
|
|
struct | has_type< QueryT, std::tuple< HeadT, TailTs... > > |
| Recursive override of the main trait. More...
|
|
struct | has_type< QueryT, std::tuple< QueryT, TailTs... > > |
| End of recursion for the main has_type trait. Becomes a true_type when the first type in the tuple matches the query type. More...
|
|
struct | has_type< QueryT, std::tuple<> > |
| An overload of the general trait that signifies that nothing can be found in an empty tuple. More...
|
|
struct | index |
| Find an index of a type in a tuple. More...
|
|
struct | index< HeadT, std::tuple< HeadT, Tail... > > |
| Specialization for a tuple that starts with the HeadT type. End of recursion. More...
|
|
struct | index< QueryT, std::tuple< HeadT, Tail... > > |
| Specialization for a tuple with a type different to QueryT that calls the recursive step. More...
|
|
struct | intersect |
| 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...
|
|
|
template<typename T > |
constexpr autoware::common::types::bool8_t COMMON_PUBLIC | impossible_branch () noexcept |
| A helper function to be used in static_assert to indicate an impossible branch. More...
|
|
template<std::size_t I = 0UL, typename Callable , typename ... TypesT> |
constexpr COMMON_PUBLIC std::enable_if_t< I==sizeof...(TypesT)> | visit (std::tuple< TypesT... > &, Callable) noexcept |
| Visit every element in a tuple. More...
|
|
template<std::size_t I = 0UL, typename Callable , typename ... TypesT> |
constexpr COMMON_PUBLIC std::enable_if_t< I==sizeof...(TypesT)> | visit (const std::tuple< TypesT... > &, Callable) noexcept |
| Same as the previous specialization but for const tuple. More...
|
|
template<std::size_t I = 0UL, typename Callable , typename ... TypesT> |
constexpr COMMON_PUBLIC std::enable_if_t< I !=sizeof...(TypesT)> | visit (std::tuple< TypesT... > &tuple, Callable callable) noexcept |
| Visit every element in a tuple. More...
|
|
template<std::size_t I = 0UL, typename Callable , typename ... TypesT> |
constexpr COMMON_PUBLIC std::enable_if_t< I !=sizeof...(TypesT)> | visit (const std::tuple< TypesT... > &tuple, Callable callable) noexcept |
| Same as the previous specialization but for const tuple. More...
|
|
template<std::size_t I = 0UL, typename Callable , typename ... TypesT>
constexpr COMMON_PUBLIC std::enable_if_t<I != sizeof...(TypesT)> autoware::common::type_traits::visit |
( |
std::tuple< TypesT... > & |
tuple, |
|
|
Callable |
callable |
|
) |
| |
|
inlineconstexprnoexcept |
Visit every element in a tuple.
This specialization is used to apply the callable to an element of a tuple and
recursively call this function on the next one.
- Parameters
-
| tuple | The tuple instance |
[in] | callable | A callable, usually a lambda with one auto input parameter. |
- Template Parameters
-
I | Current index. |
Callable | Callable type, usually a lambda with one auto input parameter. |
TypesT | Types in the tuple. |
- Returns
- Does not return anything. Capture variables in a lambda to return any values.