X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Frelational.h;h=7426e19ecea8af712554ba7ba9575fa1fc179e86;hp=317b1d23523f041e067013ab984bf9af7f3bc56d;hb=9eab44408b9213d8909b7a9e525f404ad06064dd;hpb=487e5659efe401683eee0381b0d23f967ffffc3c;ds=sidebyside diff --git a/ginac/relational.h b/ginac/relational.h index 317b1d23..7426e19e 100644 --- a/ginac/relational.h +++ b/ginac/relational.h @@ -26,6 +26,8 @@ #include #include +namespace GiNaC { + /** This class holds a relation consisting of two expressions and a logical * relation between them. */ class relational : public basic @@ -95,8 +97,12 @@ protected: extern const relational some_relational; extern type_info const & typeid_relational; -#define ex_to_relational(X) static_cast(*(X).bp) - -#endif // ndef __GINAC_RELATIONAL_H__ +// utility functions +inline const relational &ex_to_relational(const ex &e) +{ + return static_cast(*e.bp); +} +} // namespace GiNaC +#endif // ndef __GINAC_RELATIONAL_H__