mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Make constructors explicit if they could lead to unintended implicit conversion
This commit is contained in:
@@ -185,7 +185,7 @@ public:
|
||||
Flags = XprType::Flags
|
||||
};
|
||||
|
||||
unary_evaluator(const XprType &xpr) : m_argImpl(xpr.nestedExpression()) {}
|
||||
explicit unary_evaluator(const XprType &xpr) : m_argImpl(xpr.nestedExpression()) {}
|
||||
|
||||
class InnerIterator : public EvalIterator
|
||||
{
|
||||
@@ -269,7 +269,7 @@ template<int Mode>
|
||||
inline const TriangularView<Derived, Mode>
|
||||
SparseMatrixBase<Derived>::triangularView() const
|
||||
{
|
||||
return derived();
|
||||
return TriangularView<Derived, Mode>(derived());
|
||||
}
|
||||
|
||||
} // end namespace Eigen
|
||||
|
||||
Reference in New Issue
Block a user