Commit d6027843 authored by Allison Vacanti's avatar Allison Vacanti
Browse files

Specialize swap for ArrayPortalValueReference types.

parent 761f8986
...@@ -101,6 +101,26 @@ void swap(vtkm::internal::ArrayPortalValueReference<T> a, ...@@ -101,6 +101,26 @@ void swap(vtkm::internal::ArrayPortalValueReference<T> a,
{ {
a.Swap(b); a.Swap(b);
} }
template <typename T>
void swap(vtkm::internal::ArrayPortalValueReference<T> a,
typename vtkm::internal::ArrayPortalValueReference<T>::ValueType& b)
{
using ValueType = typename vtkm::internal::ArrayPortalValueReference<T>::ValueType;
const ValueType tmp = a;
a = b;
b = tmp;
}
template <typename T>
void swap(typename vtkm::internal::ArrayPortalValueReference<T>::ValueType& a,
vtkm::internal::ArrayPortalValueReference<T> b)
{
using ValueType = typename vtkm::internal::ArrayPortalValueReference<T>::ValueType;
const ValueType tmp = b;
b = a;
a = tmp;
}
} }
} // namespace vtkm::internal } // namespace vtkm::internal
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment