mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-11 00:43:13 +08:00
Fixed/masked more implicit copy constructor warnings
(cherry picked from commit 2883e91ce5a99c391fbf28e20160176b70854992)
This commit is contained in:
parent
81b5fe2f0a
commit
ca528593f4
@ -129,7 +129,7 @@ struct promote_index_type
|
|||||||
template<typename T, int Value> class variable_if_dynamic
|
template<typename T, int Value> class variable_if_dynamic
|
||||||
{
|
{
|
||||||
public:
|
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 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 static EIGEN_STRONG_INLINE T value() { return T(Value); }
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE operator T() const { return T(Value); }
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE operator T() const { return T(Value); }
|
||||||
|
@ -142,6 +142,9 @@ template<typename MatrixType, unsigned int _Mode> class SparseSelfAdjointView
|
|||||||
return *this = src.twistedBy(pnull);
|
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>
|
template<typename SrcMatrixType,unsigned int SrcMode>
|
||||||
SparseSelfAdjointView& operator=(const SparseSelfAdjointView<SrcMatrixType,SrcMode>& src)
|
SparseSelfAdjointView& operator=(const SparseSelfAdjointView<SrcMatrixType,SrcMode>& src)
|
||||||
{
|
{
|
||||||
|
@ -26,6 +26,9 @@
|
|||||||
#if defined(__GNUC__) && (__GNUC__ >=9)
|
#if defined(__GNUC__) && (__GNUC__ >=9)
|
||||||
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
|
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(__clang__) && (__clang_major__ >= 10)
|
||||||
|
#pragma clang diagnostic ignored "-Wdeprecated-copy"
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user