diff --git a/k4FWCore/include/k4FWCore/DataHandle.h b/k4FWCore/include/k4FWCore/DataHandle.h index 8485fe54..8a21e8ae 100644 --- a/k4FWCore/include/k4FWCore/DataHandle.h +++ b/k4FWCore/include/k4FWCore/DataHandle.h @@ -77,7 +77,9 @@ DataHandle::DataHandle(const std::string& descriptor, Gaudi::DataHandle::Mode podio_data_service = dynamic_cast(m_eds.get()); if (nullptr != podio_data_service) { - m_dataPtr = new T(); + if constexpr (std::is_integral_v || std::is_floating_point_v) { + m_dataPtr = new T(); + } } else { // This is the legacy implementation kept for a transition period PodioLegacyDataSvc* plds;