blob: d63f371a301b7aaea7d8dec14b2d1b9aeb4aa3c4 [file] [log] [blame]
Austin Schuh189376f2018-12-20 22:11:15 +11001static bool eigen_did_assert = false;
2#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;}
3
Brian Silverman72890c22015-09-19 14:37:37 -04004#include <iostream>
Austin Schuh189376f2018-12-20 22:11:15 +11005#include <Eigen/Eigen>
6
7#ifndef M_PI
8#define M_PI 3.1415926535897932384626433832795
9#endif
10
Brian Silverman72890c22015-09-19 14:37:37 -040011
12using namespace Eigen;
13using namespace std;
14
15int main(int, char**)
16{
17 cout.precision(3);
18 ${snippet_source_code}
19 return 0;
20}