]> www.ginac.de Git - ginac.git/blobdiff - ginac/structure.pl
* Supplement some (now deprecated) macros by inlined template functions:
[ginac.git] / ginac / structure.pl
index 1455825c1ecc598097dfcf275f3213173d933d55..8b644540ca4cee81776156d810c6c203b4abf5d5 100755 (executable)
@@ -209,10 +209,6 @@ extern const ${STRUCTURE} some_${STRUCTURE};
 extern const type_info & typeid_${STRUCTURE};
 extern const unsigned tinfo_${STRUCTURE};
 
-// macros
-
-#define ex_to_${STRUCTURE}(X) (static_cast<${STRUCTURE} const &>(*(X).bp))
-
 } // namespace GiNaC
 
 #endif // ndef _${STRUCTURE_UC}_H_
@@ -249,6 +245,7 @@ $implementation=<<END_OF_IMPLEMENTATION;
 ${input_structure}
 
 #include <iostream>
+#include <stdexcept>
 
 #include "${STRUCTURE}.h"
 #include "print.h"
@@ -346,8 +343,7 @@ ex & ${STRUCTURE}::let_op(int i)
        switch (i) {
 ${let_op_statements}
        }
-       errormsg("${STRUCTURE}::let_op(): should not reach this point");
-       return *new ex(fail());
+       throw(std::runtime_error("${STRUCTURE}::let_op(): should not have reached this point"));
 }
 
 ex ${STRUCTURE}::expand(unsigned options) const