From d4c8a94abb7d9adede11e698c6f0901ff7303b6d Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Tue, 5 Sep 2023 13:23:37 +0200 Subject: [PATCH] dont include archive.hpp, use template function --- libsrc/general/ngarray.hpp | 6 +++--- libsrc/gprim/geomobjects.hpp | 4 ++-- libsrc/linalg/vector.hpp | 6 ++---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/libsrc/general/ngarray.hpp b/libsrc/general/ngarray.hpp index e3ab1fae..e84d9838 100644 --- a/libsrc/general/ngarray.hpp +++ b/libsrc/general/ngarray.hpp @@ -8,7 +8,6 @@ /**************************************************************************/ #include -#include namespace netgen { @@ -423,8 +422,9 @@ namespace netgen } // Only provide this function if T is archivable - template - auto DoArchive(ngcore::Archive& archive) -> typename std::enable_if, void>::type + template + auto DoArchive(ARCHIVE& archive) + -> typename std::enable_if_t, void> { if(archive.Output()) archive << size; diff --git a/libsrc/gprim/geomobjects.hpp b/libsrc/gprim/geomobjects.hpp index e31110fc..f675794a 100644 --- a/libsrc/gprim/geomobjects.hpp +++ b/libsrc/gprim/geomobjects.hpp @@ -7,7 +7,6 @@ /* Date: 20. Jul. 02 */ /* *************************************************************************/ -#include #include #include @@ -72,7 +71,8 @@ namespace netgen operator const T* () const { return x; } - void DoArchive(Archive& archive) + template + void DoArchive(ARCHIVE& archive) { for(int i=0; i - namespace netgen { - using namespace ngcore; template class TFlatVector @@ -142,7 +139,8 @@ public: ~Vector () { if (ownmem) delete [] data; } - virtual void DoArchive(Archive& ar) + template + void DoArchive(ARCHIVE& ar) { auto size = s; ar & ownmem & size;