compile_snippet.cpp.in
Go to the documentation of this file.
1 static 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 
4 #include <iostream>
5 #include <cassert>
6 #include <Eigen/Eigen>
7 
8 #ifndef M_PI
9 #define M_PI 3.1415926535897932384626433832795
10 #endif
11 
12 
13 using namespace Eigen;
14 using namespace std;
15 
16 int main(int, char**)
17 {
18  cout.precision(3);
19 // intentionally remove indentation of snippet
20 {
21 ${snippet_source_code}
22 }
23  return 0;
24 }