X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Findexed.h;h=3707e6290184d56d613b135a3ab0c7536a3df1ca;hp=7f13af51bef0439451a090652f67f9d811f996bc;hb=9eab44408b9213d8909b7a9e525f404ad06064dd;hpb=487e5659efe401683eee0381b0d23f967ffffc3c;ds=sidebyside diff --git a/ginac/indexed.h b/ginac/indexed.h index 7f13af51..3707e629 100644 --- a/ginac/indexed.h +++ b/ginac/indexed.h @@ -26,6 +26,8 @@ #include #include +namespace GiNaC { + /** Base class for non-commutative indexed objects */ class indexed : public exprseq { @@ -86,10 +88,12 @@ protected: extern const indexed some_indexed; extern type_info const & typeid_indexed; -// macros +// utility functions +inline const indexed &ex_to_indexed(const ex &e) +{ + return static_cast(*e.bp); +} -#define ex_to_indexed(X) static_cast(*(X).bp) +} // namespace GiNaC #endif // ndef __GINAC_INDEXED_H__ - -