Skip to content
Snippets Groups Projects

Feature/typelist

Merged 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
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • I like the proposal, I only have two minor comments... see my code annotations.

  • Added feature label

  • Carsten Gräser Added 2 commits:

    Added 2 commits:

    • 69133af5 - [cleanup] Also add TypeListElement::type
    • 22c410ca - [doc] Fix doxygen group
  • I just added ::type. However I'd like to keep the *_t because this is the standard pattern that users will expect.

  • Carsten Gräser mentioned in merge request !9 (merged)

    mentioned in merge request !9 (merged)

  • Any more comments? Otherwise I'll merge this. It's non-intrusive anyway.

  • Carsten Gräser mentioned in commit bdbcc7dc

    mentioned in commit bdbcc7dc

  • Carsten Gräser Status changed to merged

    Status changed to merged

  • Carsten Gräser mentioned in commit e77ed897

    mentioned in commit e77ed897

  • Carsten Gräser Mentioned in commit bdbcc7dc

    Mentioned in commit bdbcc7dc

  • Carsten Gräser Mentioned in commit e77ed897

    Mentioned in commit e77ed897

  • Please register or sign in to reply
    Loading