Skip to content
  • Kenneth Moreland's avatar
    Make vtkm::Pair behave as a better core type · 77568789
    Kenneth Moreland authored
    These changes are basically to support some upcoming changes to
    ArrayHandleZip. The major additions are an implementation of VecTraits
    for Pair and an overloaded << operator to ostream for Pair.
    
    I also had to declare the operator<< for Pair to be in Types.h. Under
    some circumstances the operator has to either be declared before the
    template is declared or declared in the vtkm namespace. (The reasons are
    described at <http://clang.llvm.org/compatibility.html#dep_lookup> but I
    still don't understand.) I tried adding it to the vtkm namespace, but
    that caused several of the other operator<< to fail. Since there is no
    way to guarantee that Pair.h is declared before, say, ArrayHandle.h, I
    moved the implementation to Types.h.
    
    Since I was moving operator<< to Types.h, I went ahead and moved the
    TypeTraits and VecTraits to their respective headers. Since Pair is
    declared (but not implemented) in Types.h, these templated classes can
    be implemented without including Pair.h.
    77568789