Skip to content

Commit 0ac788e

Browse files
committed
Add static_assert in SimplicialCholeskyVisitor
1 parent 20ea064 commit 0ac788e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/nanoeigenpy/decompositions/sparse/SimplicialCholesky.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ struct SimplicialCholeskyVisitor : nb::def_visitor<SimplicialCholeskyVisitor> {
1212
template <typename SimplicialDerived, typename... Ts>
1313
void execute(nb::class_<SimplicialDerived, Ts...> &cl) {
1414
using Solver = SimplicialDerived;
15+
using Base = Eigen::SimplicialCholeskyBase<Solver>;
16+
static_assert(std::is_base_of_v<Base, Solver>);
1517
using MatrixType = typename SimplicialDerived::MatrixType;
1618
// using Scalar = typename MatrixType::Scalar;
1719
using RealScalar = typename MatrixType::RealScalar;

0 commit comments

Comments
 (0)