Audacity 3.2.0
Classes | Namespaces | Typedefs | Variables
TypeList.h File Reference

Metaprogramming utilities for manipulating lists of types. More...

#include <cstddef>
#include <tuple>
#include <type_traits>
#include <utility>
Include dependency graph for TypeList.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TypeList::type_identity< T >
 standard in C++20; add a level of indirection to a type More...
 
struct  TypeList::List<>
 Empty specialization. More...
 
struct  TypeList::List< Type, Types... >
 Non-empty specialization also defines first and rest. More...
 
struct  TypeList::Null< List< Types... > >
 
struct  TypeList::Length< List< Types... > >
 
struct  TypeList::Head< List< Types... > >
 
struct  TypeList::Tail< List< Types... > >
 
struct  TypeList::Nth< N, TypeList >
 
struct  TypeList::Nth< N, TypeList >::Countdown< I, TL >
 
struct  TypeList::Nth< N, TypeList >::Countdown< 0, TL >
 
struct  TypeList::Cons< Type, List< Types... > >
 
struct  TypeList::PushFront< TypeList, Type >
 An alternative more suggestive of C++ than Lisp conventions. More...
 
struct  TypeList::PushBack< List< Types... >, Type >
 
struct  TypeList::NonEmptyTails< TypeList >
 
struct  TypeList::NonEmptyTails< TypeList >::Next
 
struct  TypeList::Tails< TypeList >
 
struct  TypeList::Last< List< Type > >
 
struct  TypeList::Last< List< Type, Types... > >
 
struct  TypeList::ButLast< List< Type > >
 
struct  TypeList::ButLast< List< Type, Types... > >
 
struct  TypeList::Fn<>
 
struct  TypeList::Fn< Template, Templates... >
 
struct  TypeList::Compose<>
 
struct  TypeList::Compose< Metafunction, Metafunctions... >
 
struct  TypeList::Bind1st< BinaryTemplate, First >
 Given a binary template and a fixed argument, make a metafunction. More...
 
struct  TypeList::Bind2nd< BinaryTemplate, Second >
 Given a binary template and a fixed argument, make a metafunction. More...
 
struct  TypeList::Apply< Template, List< Types... > >
 
struct  TypeList::Bind< TupleLike >
 Destructure any tuple-like type into a TypeList. More...
 
struct  TypeList::Bind< TupleLike >::Impl< std::index_sequence< Is... > >
 
struct  TypeList::Map< Metafunction, TypeList >
 Transform a list of types by the given metafunction. More...
 
struct  TypeList::Map< Metafunction, TypeList >::Impl< Types >
 
struct  TypeList::MapList< Metafunction, TypeList >
 
struct  TypeList::Append<>
 
struct  TypeList::Append< TypeList, TypeLists... >
 
struct  TypeList::Append< TypeList, TypeLists... >::CaptureFirst< FirstTypes >
 
struct  TypeList::Append< TypeList, TypeLists... >::CaptureFirst< FirstTypes >::CaptureRest< RestTypes >
 
struct  TypeList::LeftFold< Op, TypeList, Initial >
 Left fold reduction of a list of types by a binary template. More...
 
struct  TypeList::LeftFold< Op, TypeList, Initial >::Impl< Types >
 
struct  TypeList::LeftFold< Op, TypeList, Initial >::Impl< Types >::Accumulate< Acc >
 
struct  TypeList::LeftFold< Op, TypeList, Initial >::Impl< Types >::Accumulate< Acc, T, Ts... >
 
struct  TypeList::LeftFoldList< Op, TypeList, Initial >
 Like LeftFold, but passing nonempty prefixes, not elements, to Op. More...
 
struct  TypeList::LeftFoldList< Op, TypeList, Initial >::Op1< T, Pair >
 
struct  TypeList::RightFold< Op, TypeList, Initial >
 Right fold reduction of a list of types by a binary template. More...
 
struct  TypeList::RightFold< Op, TypeList, Initial >::Accumulate< Acc, TL >
 
struct  TypeList::RightFold< Op, TypeList, Initial >::Accumulate< Acc, Nil >
 
struct  TypeList::RightFoldList< Op, TypeList, Initial >
 Like RightFold, but passing nonempty tails, not elements, to Op. More...
 
struct  TypeList::RightFoldList< Op, TypeList, Initial >::Accumulate< Acc, TL >
 
struct  TypeList::RightFoldList< Op, TypeList, Initial >::Accumulate< Acc, Nil >
 
struct  TypeList::Reverse< TypeList >
 
struct  TypeList::Call< Predicate, T >
 Apply a metafunction to a type. More...
 
struct  TypeList::Or<>
 
struct  TypeList::Or< Predicate, Predicates... >
 
struct  TypeList::Or< Predicate, Predicates... >::Rest< T >
 
struct  TypeList::And<>
 
struct  TypeList::And< Predicate, Predicates... >
 
struct  TypeList::And< Predicate, Predicates... >::Rest< T >
 
struct  TypeList::Every< Predicate, TypeList >
 
struct  TypeList::Some< Predicate, TypeList >
 
struct  TypeList::NotEvery< Predicate, TypeList >
 
struct  TypeList::NotAny< Predicate, TypeList >
 
struct  TypeList::In< Item, TypeList >
 
struct  TypeList::HasBaseIn< Item, TypeList >
 Whether the given type is derived from any member of the list. More...
 
struct  TypeList::StablePartition< Predicate, TypeList >
 
struct  TypeList::Filter< Predicate, TypeList >
 Select only the subsequence of the type list satisfying the predicate. More...
 

Namespaces

namespace  TypeList
 Utilities for compile-time type manipulation. Some terminology as in Lisp.
 

Typedefs

using TypeList::Nil = List<>
 
template<typename TypeList >
using TypeList::Length_t = typename Length< TypeList >::type
 
template<typename TypeList >
using TypeList::Head_t = typename Head< TypeList >::type
 
template<typename TypeList >
using TypeList::Tail_t = typename Tail< TypeList >::type
 
template<typename TypeList >
using TypeList::Rest = Tail< TypeList >
 Synonym for Tail. More...
 
template<typename TypeList >
using TypeList::Rest_t = Tail_t< TypeList >
 
template<size_t N, typename TypeList >
using TypeList::Nth_t = typename Nth< N, TypeList >::type
 
template<typename TypeList >
using TypeList::First = Nth< 0, TypeList >
 
template<typename TypeList >
using TypeList::First_t = typename First< TypeList >::type
 
template<typename TypeList >
using TypeList::Second = Nth< 1, TypeList >
 
template<typename TypeList >
using TypeList::Second_t = typename Second< TypeList >::type
 
template<typename Type , typename TypeList >
using TypeList::Cons_t = typename Cons< Type, TypeList >::type
 
template<typename TypeList , typename Type >
using TypeList::PushFront_t = typename PushFront< TypeList, Type >::type
 
template<typename TypeList , typename Type >
using TypeList::PushBack_t = typename PushBack< TypeList, Type >::type
 
template<typename TypeList >
using TypeList::NonEmptyTails_t = typename NonEmptyTails< TypeList >::type
 
template<typename TypeList >
using TypeList::Tails_t = typename Tails< TypeList >::type
 
template<typename TypeList >
using TypeList::Last_t = typename Last< TypeList >::type
 
template<typename TypeList >
using TypeList::ButLast_t = typename ButLast< TypeList >::type
 
using TypeList::Identity = Compose<>
 
template<template< typename... > class Template, typename TypeList >
using TypeList::Apply_t = typename Apply< Template, TypeList >::type
 
template<typename TupleLike >
using TypeList::Bind_t = typename Bind< TupleLike >::type
 
template<typename Metafunction , typename TypeList >
using TypeList::Map_t = typename Map< Metafunction, TypeList >::type
 
template<typename Metafunction , typename TypeList >
using TypeList::MapList_t = typename MapList< Metafunction, TypeList >::type
 
template<typename... Lists>
using TypeList::Append_t = typename Append< Lists... >::type
 
template<template< typename Type, typename Accumulator > class Op, typename TypeList , typename Initial >
using TypeList::LeftFold_t = typename LeftFold< Op, TypeList, Initial >::type
 
template<template< typename Prefix, typename Accumulator > class Op, typename TypeList , typename Initial >
using TypeList::LeftFoldList_t = typename LeftFoldList< Op, TypeList, Initial >::type
 
template<template< typename Type, typename Accumulator > class Op, typename TypeList , typename Initial >
using TypeList::RightFold_t = typename RightFold< Op, TypeList, Initial >::type
 
template<template< typename Tail, typename Accumulator > class Op, typename TypeList , typename Initial >
using TypeList::RightFoldList_t = typename RightFoldList< Op, TypeList, Initial >::type
 
template<typename TypeList >
using TypeList::Reverse_t = typename Reverse< TypeList >::type
 
template<typename Predicate , typename T >
using TypeList::Call_t = typename Call< Predicate, T >::type
 
template<bool Const>
using TypeList::MaybeConst = std::conditional_t< Const, Fn< std::add_const_t >, Identity >
 Conditionally add const to a type. More...
 
template<bool Const, typename TypeList >
using TypeList::MapConst = std::conditional_t< Const, Map< Fn< std::add_const_t >, TypeList >, type_identity< TypeList > >
 Conditionally map const over a type list. More...
 
template<bool Const, typename TypeList >
using TypeList::MapConst_t = typename MapConst< Const, TypeList >::type
 
template<typename Predicate , typename T >
using TypeList::Is = Call< Predicate, T >
 Apply a metapredicate to a type. More...
 
template<typename Predicate , typename T >
using TypeList::Is_t = typename Is< Predicate, T >::type
 
template<typename Predicate >
using TypeList::Not = Compose< Fn< std::negation >, Predicate >
 
template<typename Predicate , typename TypeList >
using TypeList::StablePartition_t = typename StablePartition< Predicate, TypeList >::type
 
template<typename Predicate , typename TypeList >
using TypeList::Filter_t = typename Filter< Predicate, TypeList >::type
 

Variables

template<typename TypeList >
constexpr auto TypeList::Null_v = Null<TypeList>::value
 
template<typename TypeList >
constexpr auto TypeList::Length_v = Length_t<TypeList>::value
 
template<typename Predicate , typename T >
static constexpr bool TypeList::Is_v
 
template<typename Predicate , typename TypeList >
constexpr auto TypeList::Every_v
 The constant value in the corresponding type. More...
 
template<typename Predicate , typename TypeList >
constexpr auto TypeList::Some_v
 The constant value in the corresponding type. More...
 
template<typename Predicate , typename TypeList >
constexpr auto TypeList::NotEvery_v
 The constant value in the corresponding type. More...
 
template<typename Predicate , typename TypeList >
constexpr auto TypeList::NotAny_v
 The constant value in the corresponding type. More...
 
template<typename Item , typename TypeList >
constexpr auto TypeList::In_v
 
template<typename Item , typename TypeList >
constexpr auto TypeList::HasBaseIn_v
 

Detailed Description

Metaprogramming utilities for manipulating lists of types.


Audacity: A Digital Audio Editor

See examples of use in TypeList.cpp

Paul Licameli

Definition in file TypeList.h.