]> www.ginac.de Git - ginac.git/blobdiff - ginac/lorentzidx.h
- put everything in "GiNaC" namespace
[ginac.git] / ginac / lorentzidx.h
index 7fc2a05def876c699581f2970f4bc2c2a90f7d9e..1a429021ef9abb0cc2550c0c13143ccbca47b393 100644 (file)
@@ -27,6 +27,8 @@
 #include <vector>
 #include <ginac/idx.h>
 
+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<const lorentzidx &>(*e.bp);
+}
 
-#define ex_to_lorentzidx(X) (static_cast<lorentzidx const &>(*(X).bp))
+} // namespace GiNaC
 
 #endif // ndef __GINAC_LORENTZIDX_H__