X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Florentzidx.h;h=1a429021ef9abb0cc2550c0c13143ccbca47b393;hp=7fc2a05def876c699581f2970f4bc2c2a90f7d9e;hb=9eab44408b9213d8909b7a9e525f404ad06064dd;hpb=487e5659efe401683eee0381b0d23f967ffffc3c;ds=sidebyside diff --git a/ginac/lorentzidx.h b/ginac/lorentzidx.h index 7fc2a05d..1a429021 100644 --- a/ginac/lorentzidx.h +++ b/ginac/lorentzidx.h @@ -27,6 +27,8 @@ #include #include +namespace GiNaC { + class lorentzidx : public idx { friend class simp_lor; @@ -81,8 +83,12 @@ protected: extern const lorentzidx some_lorentzidx; extern type_info const & typeid_lorentzidx; -// macros +// utility functions +inline const lorentzidx &ex_to_lorentzidx(const ex &e) +{ + return static_cast(*e.bp); +} -#define ex_to_lorentzidx(X) (static_cast(*(X).bp)) +} // namespace GiNaC #endif // ndef __GINAC_LORENTZIDX_H__