mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-03 18:50:39 +08:00
Add PlainObjectBase copy ctor from PlainObjectBase and DenseBase objects. (manual backport from default branch, fix segfault when creating PlainObjectBase object, though such an usage is not recommended at all)
This commit is contained in:
parent
f1583e86f6
commit
cfe315476f
@ -437,6 +437,22 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
|
||||
}
|
||||
#endif
|
||||
|
||||
/** Copy constructor */
|
||||
EIGEN_STRONG_INLINE PlainObjectBase(const PlainObjectBase& other)
|
||||
: m_storage()
|
||||
{
|
||||
_check_template_params();
|
||||
lazyAssign(other);
|
||||
}
|
||||
|
||||
template<typename OtherDerived>
|
||||
EIGEN_STRONG_INLINE PlainObjectBase(const DenseBase<OtherDerived> &other)
|
||||
: m_storage()
|
||||
{
|
||||
_check_template_params();
|
||||
lazyAssign(other);
|
||||
}
|
||||
|
||||
EIGEN_STRONG_INLINE PlainObjectBase(Index a_size, Index nbRows, Index nbCols)
|
||||
: m_storage(a_size, nbRows, nbCols)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user