mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
bug #1237: Redefine eigen_assert instead of disabling assertions for documentation snippets
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
#include <Eigen/Eigen>
|
||||
static bool eigen_did_assert = false;
|
||||
#define eigen_assert(X) if(!eigen_did_assert && !(X)){ std::cout << "### Assertion raised in " << __FILE__ << ":" << __LINE__ << ":\n" #X << "\n### The following would happen without assertions:\n"; eigen_did_assert = true;}
|
||||
|
||||
#include <iostream>
|
||||
#include <Eigen/Eigen>
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.1415926535897932384626433832795
|
||||
|
||||
Reference in New Issue
Block a user