X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fpower.h;h=3d9ae57433dbe44c41eeca88aa559e55638651f2;hp=37ce802260c31dc1bc0ede5c806034cbbd10bc9c;hb=9eab44408b9213d8909b7a9e525f404ad06064dd;hpb=487e5659efe401683eee0381b0d23f967ffffc3c diff --git a/ginac/power.h b/ginac/power.h index 37ce8022..3d9ae574 100644 --- a/ginac/power.h +++ b/ginac/power.h @@ -26,6 +26,8 @@ #include #include +namespace GiNaC { + class numeric; class add; @@ -103,7 +105,11 @@ protected: extern const power some_power; extern type_info const & typeid_power; -#define ex_to_power(X) static_cast(*(X).bp) +// utility functions +inline const power &ex_to_power(const ex &e) +{ + return static_cast(*e.bp); +} // wrapper functions @@ -119,5 +125,6 @@ inline ex pow(ex const & b, ex const & e) inline ex sqrt(ex const & a) { return power(a,exHALF()); } -#endif // ndef __GINAC_POWER_H__ +} // namespace GiNaC +#endif // ndef __GINAC_POWER_H__