bug #1237: Redefine eigen_assert instead of disabling assertions for documentation snippets

This commit is contained in:
Christoph Hertzberg
2016-05-26 18:13:33 +02:00
parent 7ff5fadcc0
commit 41dcd047d7
2 changed files with 4 additions and 4 deletions

View File

@@ -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