Skip to content
Snippets Groups Projects
Forked from Core Modules / dune-common
Source project has a limited visibility.
Carsten Gräser's avatar
Carsten Gräser authored
Feature/typelist

This adds `template<class...T> struct TypeList {};`
together with some utilities. It's e.g. used in the
concept checking facility that I'll add soon.

Besides this it can be used to 'store' an argument pack and access
its members. In contrast to a `std::tuple<T...>` which is
a container of objects of types `T...` a `TypeList<T...>`
only captures the types themselves . Hence one can easily
create TypeList objects and use them to pass types around
or, e.g., in overload resolution where they can be used for
tag-dispatch.

Notice that adding a template `packer<T...>` doing exactly
the same has been proposed for the standard in [N4115][].
But in my opinion TypeList is a more instructive name.

[N4115]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4115.html

See merge request !7
bdbcc7dc
History
Name Last commit Last update