Particle: explicitly make the copy ctor and assignment op

They are disabled because we have a custom destructor.
This commit is contained in:
Ben Boeckel 2020-09-10 10:03:31 -04:00
parent 1037aa756e
commit 482266b442

@ -129,6 +129,13 @@ public:
VTKM_EXEC_CONT
Particle() {}
VTKM_EXEC_CONT Particle(const vtkm::Particle& rhs)
: ParticleBase(rhs)
{
// This must not be defaulted, since defaulted copy constructors are
// troublesome with CUDA __host__ __device__ markup.
}
VTKM_EXEC_CONT ~Particle() noexcept override
{
// This must not be defaulted, since defaulted virtual destructors are
@ -146,6 +153,19 @@ public:
{
}
VTKM_EXEC_CONT Particle& operator=(const vtkm::Particle& rhs)
{
// This must not be defaulted, since defaulted assignment operators are
// troublesome with CUDA __host__ __device__ markup.
if (&rhs == this)
{
return *this;
}
vtkm::ParticleBase::operator=(rhs);
return *this;
}
VTKM_EXEC_CONT
vtkm::Vec3f Next(const vtkm::VecVariable<vtkm::Vec3f, 2>& vectors,
const vtkm::FloatDefault& length) override