]> www.ginac.de Git - ginac.git/blobdiff - doc/examples/compile1.cpp
[C++20] Clean up using-declarations.
[ginac.git] / doc / examples / compile1.cpp
index cc81229e84c2ac721613696552253337f85b0c31..b92dc766b3bb4501321fbbde208ff08569c31f63 100644 (file)
@@ -1,7 +1,8 @@
 #include <ctime>
 #include <iostream>
-using namespace std;
 #include <ginac/ginac.h>
+
+using namespace std;
 using namespace GiNaC;
 
 /*
@@ -25,6 +26,9 @@ int main()
 
        // Our function pointer that points to the compiled ex
        FUNCP_1P fp;
+
+       // Optionally, compile with custom compiler flags:
+       // setenv("CXXFLAGS", "-O3 -fomit-frame-pointer -ffast-math", 1);
        compile_ex(expr, x, fp);
 
        // Do some (not necessarily meaningful ;-)) numerical stuff ...