Fixed/masked more implicit copy constructor warnings

(cherry picked from commit 2883e91ce5a99c391fbf28e20160176b70854992)
This commit is contained in:
Christoph Hertzberg 2021-02-27 16:34:42 +01:00
parent 81b5fe2f0a
commit ca528593f4
3 changed files with 7 additions and 1 deletions

View File

@ -129,7 +129,7 @@ struct promote_index_type
template<typename T, int Value> class variable_if_dynamic
{
public:
EIGEN_EMPTY_STRUCT_CTOR(variable_if_dynamic)
EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(variable_if_dynamic)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit variable_if_dynamic(T v) { EIGEN_ONLY_USED_FOR_DEBUG(v); eigen_assert(v == T(Value)); }
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE T value() { return T(Value); }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE operator T() const { return T(Value); }

View File

@ -142,6 +142,9 @@ template<typename MatrixType, unsigned int _Mode> class SparseSelfAdjointView
return *this = src.twistedBy(pnull);
}
// Since we override the copy-assignment operator, we need to explicitly re-declare the copy-constructor
EIGEN_DEFAULT_COPY_CONSTRUCTOR(SparseSelfAdjointView)
template<typename SrcMatrixType,unsigned int SrcMode>
SparseSelfAdjointView& operator=(const SparseSelfAdjointView<SrcMatrixType,SrcMode>& src)
{

View File

@ -26,6 +26,9 @@
#if defined(__GNUC__) && (__GNUC__ >=9)
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
#endif
#if defined(__clang__) && (__clang_major__ >= 10)
#pragma clang diagnostic ignored "-Wdeprecated-copy"
#endif
#endif