X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fadd.h;h=f471741b95464d5539283ae7158a498d31c8a76a;hp=783830345b682f4d18ee7bcd6741fc6a77e4104e;hb=9eab44408b9213d8909b7a9e525f404ad06064dd;hpb=a8507b8af1c08d9b27d98d57f95c7ca1a8671e27 diff --git a/ginac/add.h b/ginac/add.h index 78383034..f471741b 100644 --- a/ginac/add.h +++ b/ginac/add.h @@ -1,7 +1,8 @@ /** @file add.h * - * Interface to GiNaC's sums of expressions. - * + * Interface to GiNaC's sums of expressions. */ + +/* * GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify @@ -22,6 +23,10 @@ #ifndef __GINAC_ADD_H__ #define __GINAC_ADD_H__ +#include + +namespace GiNaC { + /** Sum of expressions. */ class add : public expairseq { @@ -103,7 +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); +} -#endif // ndef __GINAC_ADD_H__ +} // namespace GiNaC +#endif // ndef __GINAC_ADD_H__