From 201dee45fb7389333f759a85fcbf9737009045aa Mon Sep 17 00:00:00 2001 From: Hans-Christian Ebke Date: Mon, 23 Nov 2015 21:16:34 +0100 Subject: [PATCH] HeapT: New optimization should compile in C++98 as well... --- src/OpenMesh/Tools/Utils/HeapT.hh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/OpenMesh/Tools/Utils/HeapT.hh b/src/OpenMesh/Tools/Utils/HeapT.hh index 12c5cfb4..545cfb5e 100644 --- a/src/OpenMesh/Tools/Utils/HeapT.hh +++ b/src/OpenMesh/Tools/Utils/HeapT.hh @@ -79,7 +79,9 @@ #include "Config.hh" #include #include +#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__) #include +#endif //== NAMESPACE ================================================================ @@ -148,11 +150,18 @@ public: /// Constructor HeapT() : HeapVector() {} +#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__) /// Construct with a given \c HeapIterface. HeapT(HeapInterface _interface) : HeapVector(), interface_(std::move(_interface)) {} - +#else + /// Construct with a given \c HeapIterface. + HeapT(const HeapInterface &_interface) + : HeapVector(), interface_(_interface) + {} +#endif + /// Destructor. ~HeapT(){};