X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fadd.h;h=f471741b95464d5539283ae7158a498d31c8a76a;hp=0545bcd2e1fd9d3710ce01e01054ee1bdadafff7;hb=9eab44408b9213d8909b7a9e525f404ad06064dd;hpb=487e5659efe401683eee0381b0d23f967ffffc3c;ds=sidebyside diff --git a/ginac/add.h b/ginac/add.h index 0545bcd2..f471741b 100644 --- a/ginac/add.h +++ b/ginac/add.h @@ -25,6 +25,8 @@ #include +namespace GiNaC { + /** Sum of expressions. */ class add : public expairseq { @@ -106,6 +108,12 @@ protected: extern const add some_add; extern type_info const & typeid_add; -#define ex_to_add(X) static_cast(*(X).bp) +// utility functions +inline const add &ex_to_add(const ex &e) +{ + return static_cast(*e.bp); +} + +} // namespace GiNaC #endif // ndef __GINAC_ADD_H__