Skip to content

Feature/typelist

Carsten Gräser requested to merge feature/typelist into master

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.

Merge request reports

Loading