ソースを参照

Fixed friends declarations

gbeurier 7 年 前
コミット
1fba1c088c
1 ファイル変更18 行追加20 行削除
  1. 18 20
      src/artis/utils/Trace.hpp

+ 18 - 20
src/artis/utils/Trace.hpp

@@ -38,7 +38,6 @@
 #include <iso646.h>
 #endif
 
-#ifdef WITH_TRACE
 //fwd decl for friend classes in TraceElement
 namespace artis { namespace kernel {
     template < typename T, typename U, typename V, typename W >
@@ -52,7 +51,6 @@ namespace artis { namespace kernel {
     template < typename T, typename U, typename V >
     class Externals;
 }}
-#endif
 
 namespace artis { namespace utils {
 
@@ -140,6 +138,24 @@ private:
 template < class Time >
 class TraceElement
 {
+    template < typename T, typename U, typename V, typename W >
+    friend class artis::kernel::AbstractCoupledModel;
+    template < typename T, typename U, typename V >
+    friend class artis::kernel::AbstractAtomicModel;
+    template < typename Time, typename Parameters >
+    friend class artis::kernel::AbstractModel;
+    template < typename T, typename U, typename V >
+    friend class artis::kernel::Internals;
+    template < typename T, typename U, typename V >
+    friend class artis::kernel::Externals;
+
+private:
+    TraceElement(bool from_kernel, const std::string& model_name, typename Time::type time,
+                 TraceType type) :
+        _model_name(model_name), _time(time), _type(type),
+        _from_kernel(from_kernel)
+    { }
+
 public:
     TraceElement() : _time(Time::null), _type(NONE),
                      _from_kernel(false)
@@ -186,24 +202,6 @@ private:
     KernelInfo         _kernel_info;
     bool _from_kernel;
 
-#ifdef WITH_TRACE
-    template < typename T, typename U, typename V, typename W >
-    friend class artis::kernel::AbstractCoupledModel;
-    template < typename T, typename U, typename V >
-    friend class artis::kernel::AbstractAtomicModel;
-    template < typename Time, typename Parameters >
-    friend class artis::kernel::AbstractModel;
-    template < typename T, typename U, typename V >
-    friend class artis::kernel::Internals;
-    template < typename T, typename U, typename V >
-    friend class artis::kernel::Externals;
-private:
-    TraceElement(bool from_kernel, const std::string& model_name, typename Time::type time,
-                 TraceType type) :
-        _model_name(model_name), _time(time), _type(type),
-        _from_kernel(from_kernel)
-    { }
-#endif
 };
 
 template < class Time >