]> www.ginac.de Git - ginac.git/blobdiff - ginac/indexed.h
- put everything in "GiNaC" namespace
[ginac.git] / ginac / indexed.h
index 7f13af51bef0439451a090652f67f9d811f996bc..3707e6290184d56d613b135a3ab0c7536a3df1ca 100644 (file)
@@ -26,6 +26,8 @@
 #include <string>
 #include <ginac/exprseq.h>
 
+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<const indexed &>(*e.bp);
+}
 
-#define ex_to_indexed(X) static_cast<indexed const &>(*(X).bp)
+} // namespace GiNaC
 
 #endif // ndef __GINAC_INDEXED_H__
-
-