Loading...
Searching...
No Matches
TypeList.h File Reference

A TypeList provides a compile time sequence of heterogeneous types which can be accessed, transformed and executed over in various ways. It incorporates a subset of functionality similar to boost::mpl::vector however provides most of its content through using declarations rather than additional typed classes. More...

`#include "version.h"`
`#include <tuple>`
`#include <type_traits>`

Go to the source code of this file.

## Classes

struct | TypeList< Ts >
| A list of types (not necessarily unique) More...
struct | TupleList< Ts >
| A trivial wrapper around a std::tuple but with compatible TypeList methods. Importantly can be instatiated from a TypeList and implements a similar foreach interface. More...
struct | TupleList<>
| Specilization of an empty TupleList. Required due to constructor selection. More...

## Namespaces

namespace | openvdb
namespace | openvdb::v11_0

## Macros

#define | OPENVDB_TYPELIST_FORCE_INLINE OPENVDB_FORCE_INLINE

## Functions

template<size_t Start, size_t End, typename OpT>
OPENVDB_FORCE_INLINE auto | foreachIndex (OpT op)
template<size_t Start, size_t End, typename OpT, typename RetT>
OPENVDB_FORCE_INLINE RetT | evalFirstIndex (OpT op, const RetT def=RetT())

## Detailed Description

A TypeList provides a compile time sequence of heterogeneous types which can be accessed, transformed and executed over in various ways. It incorporates a subset of functionality similar to boost::mpl::vector however provides most of its content through using declarations rather than additional typed classes.

## Macro Definition Documentation

## OPENVDB_TYPELIST_FORCE_INLINE

#define OPENVDB_TYPELIST_FORCE_INLINE OPENVDB_FORCE_INLINE

We should usually not be decorating public API functions with attributes such as always_inline. However many compilers are notoriously bad at inlining recursive template loops with default inline settings. The TypeList and TupleList metaprogram constructs heavily use this C++ feature and the performance difference can be substantial, even for very small lists. You can disable this behaviour by setting the define: OPENVDB_TYPELIST_NO_FORCE_INLINE This will disable the force inling on public API methods in this file.