]> www.ginac.de Git - ginac.git/blobdiff - ginac/power.h
- put everything in "GiNaC" namespace
[ginac.git] / ginac / power.h
index 37ce802260c31dc1bc0ede5c806034cbbd10bc9c..3d9ae57433dbe44c41eeca88aa559e55638651f2 100644 (file)
@@ -26,6 +26,8 @@
 #include <ginac/basic.h>
 #include <ginac/ex.h>
 
 #include <ginac/basic.h>
 #include <ginac/ex.h>
 
+namespace GiNaC {
+
 class numeric;
 class add;
 
 class numeric;
 class add;
 
@@ -103,7 +105,11 @@ protected:
 extern const power some_power;
 extern type_info const & typeid_power;
 
 extern const power some_power;
 extern type_info const & typeid_power;
 
-#define ex_to_power(X) static_cast<power const &>(*(X).bp)
+// utility functions
+inline const power &ex_to_power(const ex &e)
+{
+       return static_cast<const power &>(*e.bp);
+}
 
 // wrapper functions
 
 
 // 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()); }
 
 inline ex sqrt(ex const & a)
 { return power(a,exHALF()); }
 
-#endif // ndef __GINAC_POWER_H__
+} // namespace GiNaC
 
 
+#endif // ndef __GINAC_POWER_H__