OpenVDB  6.1.0
Public Types | Static Public Member Functions | List of all members
TypeList< Ts > Struct Template Reference

A list of types (not necessarily unique) More...

#include <Types.h>

Public Types

using Self = TypeList
 The type of this list. More...
 
template<typename... TypesToAppend>
using Append = typename internal::TSAppendImpl< Self, TypesToAppend... >::type
 Append types, or the members of another TypeList, to this list. More...
 
template<typename... TypesToRemove>
using Remove = typename internal::TSRemoveImpl< Self, TypesToRemove... >::type
 Remove all occurrences of one or more types, or the members of another TypeList, from this list. More...
 

Static Public Member Functions

template<typename OpT >
static void foreach (OpT op)
 Invoke a templated, unary functor on a value of each type in this list. More...
 

Detailed Description

template<typename... Ts>
struct openvdb::v6_1::TypeList< Ts >

A list of types (not necessarily unique)

Example:

Member Typedef Documentation

using Append = typename internal::TSAppendImpl<Self, TypesToAppend...>::type

Append types, or the members of another TypeList, to this list.

Example:

{
using NumericTypes = IntTypes::Append<RealTypes>;
}
{
using NumericTypes = IntTypes::Append<float>::Append<double>;
}
using Remove = typename internal::TSRemoveImpl<Self, TypesToRemove...>::type

Remove all occurrences of one or more types, or the members of another TypeList, from this list.

Example:

{
using ShortTypes = NumericTypes::Remove<LongTypes>; // float, Int16, Int32
}
using Self = TypeList

The type of this list.

Member Function Documentation

static void foreach ( OpT  op)
inlinestatic

Invoke a templated, unary functor on a value of each type in this list.

Example:

#include <typeinfo>
template<typename ListT>
void printTypeList()
{
std::string sep;
auto op = [&](auto x) { // C++14
std::cout << sep << typeid(decltype(x)).name(); sep = ", "; };
}
printTypeList<MyTypes>(); // "i, f, d" (exact output is compiler-dependent)
Note
The functor object is passed by value. Wrap it with std::ref to use the same object for each type.

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