Skip to content

Add vtkm::List

Kenneth Moreland requested to merge kmorel/vtk-m:simple-list-template into master

vtkm::List is meant to replace vtkm::ListTag. Rather than subclassing a base class with a variadic template, all lists expose the list of types.

vtkm::ListTag was originally created before we required C++11 so supporting variadic templates was problematic. To hide the issue we had, we made list tags subclass other lists rather than be the list themselves. It makes for nicer types in the compiler, but hides important details about what is actually in the type. It also creates lots of unnecessary new types.

The new vtkm::List is in some ways simpler. All lists have to be a vtkm::List. Subclasses are not supported (or rather, they will not work as expected). All manipulations (such as vtkm::ListAppend) resolve directly back to a vtkm::List. Although the types reported by the compiler will be longer, they will be more specific to the types being used. Also, the new implimentation should ultimately use fewer types.

Edited by Kenneth Moreland

Merge request reports

Loading