From bb7068fce7bda43e526f6823ba0bcb4d98c30d19 Mon Sep 17 00:00:00 2001
From: scott snyder <scott.snyder@cern.ch>
Date: Mon, 10 Dec 2018 14:01:18 +0100
Subject: [PATCH] EventContainers: Fix gcc9 warnings.

In C++11, implicit declarations of copy and assignment are deprecated if the
class has a user defined destructor or copy or assignment.  gcc9 now warns
about this by default.
Adjust to avoid the warning.
---
 .../EventContainers/IdentifiableContainerMT.h         | 11 -----------
 Event/EventContainers/test/IDC_Realistic_Test.cxx     |  4 +++-
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/Event/EventContainers/EventContainers/IdentifiableContainerMT.h b/Event/EventContainers/EventContainers/IdentifiableContainerMT.h
index 4417de46067..9457b295e7c 100644
--- a/Event/EventContainers/EventContainers/IdentifiableContainerMT.h
+++ b/Event/EventContainers/EventContainers/IdentifiableContainerMT.h
@@ -106,17 +106,6 @@ public:
         /// iterator constructor
         const_iterator() : m_sptr(), m_current(nullptr), m_idContainer(nullptr), m_end(false) { }
 
-        /// assignment operator
-        const_iterator& operator = ( const const_iterator & it ) {
-            if(this == &it) return *this;//Safeguard against self assignment
-            m_hashItr     = it.m_hashItr;
-            m_sptr        = it.m_sptr;
-            m_current     = it.m_current;
-            m_idContainer = it.m_idContainer;
-            m_end         = it.m_end;
-            return *this;
-        }
-
         /// increment operator
         const_iterator& operator ++ () {
             if(m_end) return *this;
diff --git a/Event/EventContainers/test/IDC_Realistic_Test.cxx b/Event/EventContainers/test/IDC_Realistic_Test.cxx
index e6546afe0e9..a8da38a9947 100644
--- a/Event/EventContainers/test/IDC_Realistic_Test.cxx
+++ b/Event/EventContainers/test/IDC_Realistic_Test.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 #include "EventContainers/IdentifiableContainerMT.h"
 #include <vector>
@@ -208,6 +208,8 @@ public:
     PseudoView(int s, int r, EventContainers::IdentifiableCache<MyCollection>* inIDC, int i) : IDC(inIDC), RoIStart(s), RoIEnd(r),
         threads(i), c()   {}
 
+  PseudoView (const PseudoView&) = default;
+  PseudoView& operator= (const PseudoView&) = default;
   virtual ~PseudoView() {}
 };
 
-- 
GitLab