Fix warnings about assignment operators not being generated

For some reason when VTK-m was being compiled as an accelerator in VTK,
Visual Studio 2013 gave a bunch of warnings about not being able to generate
assignment operators for many classes. This happened for classes with a
const ivar that could not be automatically set. (Automatic copy constructors
are fine on this count.) I'm not sure why these warnings did not happen
when just compiling VTK-m, nor am I sure why they were generated at all as
no code actually used the copy constructors.

This commit fixes the problems by adding a private declaration for assignment
operators that cannot be automatically created. No implementation is
provided, nor should any be needed.
This commit is contained in:
Kenneth Moreland 2017-01-10 11:10:38 -07:00
parent 7ec8c03489
commit f23ff9fa49
13 changed files with 57 additions and 0 deletions

@ -256,6 +256,9 @@ struct BindLeftBinaryOp
return static_cast<ReturnT>(this->BinaryOp(this->LeftValue,
static_cast<T>(rightValue)));
}
private:
void operator=(const BindLeftBinaryOp<T,BinaryOpType,ReturnT> &); // Not implemented
};
template<typename T, typename BinaryOpType, typename ReturnT = T>
@ -275,6 +278,9 @@ struct BindRightBinaryOp
return static_cast<ReturnT>(this->BinaryOp(static_cast<T>(leftValue),
this->RightValue));
}
private:
void operator=(const BindRightBinaryOp<T,BinaryOpType,ReturnT> &); // Not implemented
};
} // namespace internal

@ -452,6 +452,8 @@ private:
{
// This type of array handle cannot exist, so do nothing.
}
void operator=(const DynamicArrayHandleTryStorage<Functor,Type> &); // Not implemented
};
template<typename Functor, typename StorageList>
@ -478,6 +480,9 @@ struct DynamicArrayHandleTryType {
this->FoundCast = true;
}
}
private:
void operator=(const DynamicArrayHandleTryType<Functor,StorageList> &); // Not implemented
};
} // namespace detail

@ -326,6 +326,9 @@ struct DynamicCellSetTryCellSet
}
}
}
private:
void operator=(const DynamicCellSetTryCellSet<Functor> &); // Not implemented
};
} // namespace detail

@ -128,6 +128,9 @@ struct TryExecuteImpl
return this->Success;
}
private:
void operator=(const TryExecuteImpl<FunctorType> &); // Not implemented
};
} // namespace detail

@ -261,6 +261,8 @@ private:
private:
const FunctorType Functor;
void operator=(const ScheduleKernel<FunctorType> &); // Not implemented
};
public:

@ -91,6 +91,9 @@ struct FilterDataSetPrepareForExecutionFunctor
this->Result = this->Self->DoExecute(this->Input, this->Policy, Device());
return this->Result.IsValid();
}
private:
void operator=(FilterDataSetPrepareForExecutionFunctor<Derived,DerivedPolicy> &); // Not implemented
};
} // namespace detail

@ -54,6 +54,9 @@ struct PointGrad
const vtkm::cont::CoordinateSystem* const Points;
const vtkm::cont::ArrayHandle<T,S>* const InField;
vtkm::cont::ArrayHandle< vtkm::Vec<T,3> >* Result;
private:
void operator=(const PointGrad<DerivedPolicy,Device,T,S> &); // Not implemented
};
//-----------------------------------------------------------------------------

@ -85,6 +85,10 @@ private:
tag );
return this->Instance.Result.IsValid();
}
private:
// Not implemented
void operator=(const ResolveFieldTypeAndExecuteForDevice<T,StorageTag>&);
};
public:
@ -97,6 +101,10 @@ public:
this->Tracker,
typename DerivedPolicy::DeviceAdapterList());
}
private:
// Not implemented
void operator=(const ResolveFieldTypeAndExecute<Derived,DerivedPolicy,ResultType> &);
};
}

@ -94,6 +94,10 @@ private:
return this->Valid;
}
private:
// Not implemented
void operator=(const ResolveFieldTypeAndMapForDevice<T,StorageTag>&);
};
public:
@ -106,6 +110,10 @@ public:
typename DerivedPolicy::DeviceAdapterList());
this->RanProperly = doResolve.Valid;
}
private:
// Not implemented
void operator=(const ResolveFieldTypeAndMap<Derived,DerivedPolicy> &);
};
}

@ -848,6 +848,9 @@ private:
vtkm::internal::FunctionInterface<NewFunction> &NewInterface;
const TransformFunctor &Transform;
const FinishFunctor &Finish;
// Not implemented
void operator=(const FunctionInterfaceDynamicTransformContContinue<OriginalFunction,NewFunction,TransformFunctor,FinishFunctor> &);
};
} // namespace detail

@ -259,6 +259,10 @@ struct Invocation
const ParameterInterface Parameters;
OutputToInputMapType OutputToInputMap;
VisitArrayType VisitArray;
private:
// Do not allow assignment of one Invocation to another. It is too expensive.
void operator=(const Invocation<ParameterInterface,ControlInterface,ExecutionInterface,InputDomainIndex,OutputToInputMapType,VisitArrayType> &);
};
/// Convenience function for creating an Invocation object.

@ -326,6 +326,9 @@ private:
const vtkm::Float64 Isovalue;
const bool GenerateNormals;
EdgeWeightGenerateMetaData<ScalarType, NormalStorageType, DeviceAdapter> MetaData;
// Not implemented
void operator=(const EdgeWeightGenerate<ScalarType,NormalStorageType,DeviceAdapter> &);
};

@ -155,6 +155,9 @@ private:
VTKM_CONT
void WillContinue(const T&, std::false_type) const
{ }
// Not implemented
void operator=(const DispatcherBaseTypeCheckFunctor<ContinueFunctor,TypeCheckTag,Index> &);
};
// Uses vtkm::cont::internal::DynamicTransform and the DynamicTransformCont
@ -257,6 +260,9 @@ struct DispatcherBaseTransportFunctor
vtkm::cont::arg::Transport<TransportTag,ControlParameter,Device> transport;
return transport(invokeData, this->InputDomain, this->OutputSize);
}
private:
void operator=(const DispatcherBaseTransportFunctor &); // Not implemented
};
} // namespace detail