Skip to content
Snippets Groups Projects
Commit e09ce90e authored by Marcin Nowak's avatar Marcin Nowak :radioactive:
Browse files

Disambiguate TClass::Destructor when taking its address - ATEAM-708

Same fix as !41031 but in SharedWriter now
parent a081765e
No related branches found
No related tags found
No related merge requests found
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
/** @file AthenaRootSharedWriterSvc.cxx
......@@ -35,7 +35,8 @@ public:
void* dummyAddr()
{
if (clazz) {
std::function<void(void*)> del = std::bind(&TClass::Destructor, clazz, std::placeholders::_1, false);
void(TClass::*dxtor)(void*, Bool_t) = &TClass::Destructor;
std::function<void(void*)> del = std::bind(dxtor, clazz, std::placeholders::_1, false);
dummyptr = std::unique_ptr<void, std::function<void(void*)> >(clazz->New(), std::move(del));
dummy = dummyptr.get();
return &dummy;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment