From 3776ad33d5b96ddd15e44ecf3c8958b8f8289e13 Mon Sep 17 00:00:00 2001
From: Ben Couturier <ben.couturier@cern.ch>
Date: Fri, 5 Nov 2021 18:06:03 +0100
Subject: [PATCH] Added the default move constructor and assignmment operator
 to ConditionObject and NamedObject

---
 DDCore/include/DD4hep/NamedObject.h              | 6 +++++-
 DDCore/include/DD4hep/detail/ConditionsInterna.h | 4 ++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/DDCore/include/DD4hep/NamedObject.h b/DDCore/include/DD4hep/NamedObject.h
index 09eac69c0..88b8e9326 100644
--- a/DDCore/include/DD4hep/NamedObject.h
+++ b/DDCore/include/DD4hep/NamedObject.h
@@ -45,11 +45,15 @@ namespace dd4hep {
     NamedObject() = default;
     /// Copy constructor
     NamedObject(const NamedObject& c) = default;
+    /// Move constructor
+    NamedObject(NamedObject&& c) = default;
+
     /// Default destructor
     virtual ~NamedObject() = default;
     /// Assignment operator
     NamedObject& operator=(const NamedObject& c) = default;
-
+    /// Move assignment operator
+    NamedObject& operator=(NamedObject&& c) = default;
     /// Access name
     const char* GetName()  const  {
       return name.c_str();
diff --git a/DDCore/include/DD4hep/detail/ConditionsInterna.h b/DDCore/include/DD4hep/detail/ConditionsInterna.h
index 39d1f3a8e..8d600473c 100644
--- a/DDCore/include/DD4hep/detail/ConditionsInterna.h
+++ b/DDCore/include/DD4hep/detail/ConditionsInterna.h
@@ -85,12 +85,16 @@ namespace dd4hep {
       ConditionObject();
       /// No copy constructor
       ConditionObject(const ConditionObject&) = delete;
+      // Move constructor
+      ConditionObject(ConditionObject&&) = default;
       /// Standard constructor
       ConditionObject(const std::string& nam,const std::string& tit="");
       /// Standard Destructor
       virtual ~ConditionObject();
       /// No assignment operation
       ConditionObject& operator=(const ConditionObject&) = delete;
+      /// Move assignment operator
+      ConditionObject& operator=(ConditionObject&&) = default;
       /// Increase reference counter (Used by persistency mechanism)
       ConditionObject* addRef()  {  ++refCount; return this;         }
       /// Release object (Used by persistency mechanism)
-- 
GitLab