cart-elc

Source code for CART-ELC
git clone git://git.laack.co/cart-elc.git
Log | Files | Refs | README | LICENSE

compile_snippet.cpp.in (555B)


      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 <Eigen/Eigen>
      6 
      7 #ifndef M_PI
      8 #define M_PI 3.1415926535897932384626433832795
      9 #endif
     10 
     11 
     12 using namespace Eigen;
     13 using namespace std;
     14 
     15 int main(int, char**)
     16 {
     17   cout.precision(3);
     18 // intentionally remove indentation of snippet
     19 {
     20 ${snippet_source_code}
     21 }
     22   return 0;
     23 }