mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Ensure info() implementation across all SolverBase derived types
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
f3e7d64f3d
commit
6f1a143418
@@ -78,6 +78,14 @@ class SolverBase : public EigenBase<Derived> {
|
||||
template <typename Derived_>
|
||||
friend struct internal::solve_assertion;
|
||||
|
||||
ComputationInfo info() const {
|
||||
// CRTP static dispatch: Calls the 'info()' method on the derived class.
|
||||
// Derived must implement 'ComputationInfo info() const'.
|
||||
// If not implemented, name lookup falls back to this base method, causing
|
||||
// infinite recursion (detectable by -Winfinite-recursion).
|
||||
return derived().info();
|
||||
}
|
||||
|
||||
enum {
|
||||
RowsAtCompileTime = internal::traits<Derived>::RowsAtCompileTime,
|
||||
ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime,
|
||||
|
||||
Reference in New Issue
Block a user