Skip to content
  • Kenneth Moreland's avatar
    Add tag-based type list templates · c2d926fa
    Kenneth Moreland authored
    Provies a list of types in a template like boost::mpl::vector and a
    method to call a functor on each type. However, rather than explicitly
    list each type, uses tags to identify the list. This provides the
    following main advantages:
    
    1. Can use these type lists without creating horrendously long class
    names based on them, making compiler errors easier to read. For example,
    you would have a typename like MyClass<TypeListTagVectors> instead of
    MyClass<TypeList<Id3,Vector2,Vector3,Vector4> > (or worse if variadic
    templates are not supported). This is the main motivation for this
    implementation.
    
    2. Do not require variadic templates and usually few constructions. That
    should speed compile times.
    
    There is one main disadvantage to this approach: It is difficult to get
    a printed list of items in a list during an error. If necessary, it
    probably would not be too hard to make a template to convert a tag to a
    boost mpl vector.
    c2d926fa