Basic meta-programming utilities for types, focused on template parameter packs.
#include <cstddef>
#include <type_traits>
#include <typeindex>
#include <typeinfo>
#include <utility>
Classes | |
struct | type_pack< Ts > |
Provides a tag to pass a parameter packs for ease of inference. More... | |
struct | type_at< I, Ts > |
Extracts the Ith type from a sequence of types. More... | |
struct | type_tag< T > |
Provides a tag to pass a type for ease of inference. More... | |
struct | template_single_tag< Tpl > |
Provides a tag for single-parameter templates. More... | |
struct | type_pack< Ts > |
Provides a tag to pass a parameter packs for ease of inference. More... | |
struct | type_visit_with_default |
Visit a type by constructing its default value. More... | |
struct | type_visit_with_tag< Tag > |
Visits a type by construct a template tag's default value. More... | |
struct | type_check_different_from< T > |
Provides a check which returns whether T is different than U . More... | |
Namespaces | |
drake | |
Typedefs | |
template<typename T > | |
using | type_pack_extract = typename internal::type_pack_extract_impl< T >::type |
Extracts the inner template arguments (typename only) for a typename which is a template instantiation. More... | |
template<typename T > | |
using | type_check_always_true = std::true_type |
Provides a check which will return true for any type. More... | |
Functions | |
template<template< typename... > class Tpl, typename... Ts> | |
Tpl< Ts... > | type_bind (type_pack< Ts... >) |
Returns an expression (only to be used in decltype ) for inferring and binding a parameter pack to a template. More... | |
template<class VisitWith = type_visit_with_default, template< typename > class Predicate = type_check_always_true, typename Visitor = void, typename... Ts> | |
void | type_visit (Visitor &&visitor, type_pack< Ts... >={}, template_single_tag< Predicate >={}) |
Visits each type in a type pack. This effectively implements a. More... | |
template<typename T > | |
constexpr size_t | type_hash () |
Provides short-hand for hashing a type. More... | |