mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
Add more operator= to ArrayPortalValueReference
Forward arguments to assignment operator in ArrayPoetalValueReference better.
This commit is contained in:
parent
c8db70ae8c
commit
b141f75150
@ -81,19 +81,19 @@ struct ArrayPortalValueReference
|
||||
}
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_EXEC_CONT
|
||||
ArrayPortalValueReference<ArrayPortalType>& operator=(
|
||||
const ArrayPortalValueReference<ArrayPortalType>& rhs)
|
||||
template <typename OtherPortalType>
|
||||
VTKM_EXEC_CONT ArrayPortalValueReference<ArrayPortalType>& operator=(
|
||||
const ArrayPortalValueReference<OtherPortalType>& rhs)
|
||||
{
|
||||
this->Set(rhs.Portal.Get(rhs.Index));
|
||||
this->Set(static_cast<ValueType>(rhs.Portal.Get(rhs.Index)));
|
||||
return *this;
|
||||
}
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
VTKM_EXEC_CONT
|
||||
ValueType operator=(const ValueType& value)
|
||||
template <typename T>
|
||||
VTKM_EXEC_CONT ValueType operator=(T&& value)
|
||||
{
|
||||
this->Set(value);
|
||||
this->Set(std::forward<T>(value));
|
||||
return value;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user