Allow vtkm::Pair Dimension and Numeric Tab to be found.

For now the pair's numeric type is determined by the first elements type.
This commit is contained in:
Robert Maynard 2015-06-10 08:57:21 -04:00
parent 7639c876bd
commit ee4687f8ee

@ -21,6 +21,7 @@
#define vtk_m_TypeTraits_h
#include <vtkm/Types.h>
#include <vtkm/Pair.h>
namespace vtkm {
@ -120,6 +121,15 @@ struct TypeTraits<vtkm::Vec<T,Size> >
typedef TypeTraitsVectorTag DimensionalityTag;
};
/// Traits for Pair types.
///
template<typename T, typename U>
struct TypeTraits<vtkm::Pair<T,U> >
{
typedef typename vtkm::TypeTraits<T>::NumericTag NumericTag;
typedef TypeTraitsScalarTag DimensionalityTag;
};
} // namespace vtkm
#endif //vtk_m_TypeTraits_h