Skip to content
Snippets Groups Projects
Commit ba37ad6c authored by Sergei Zharko's avatar Sergei Zharko
Browse files

PODAllocator: loosen the requirements on T to non-polymorphic

This does not break the allocation mechanism, but allows to use the PODAllocator
with derived classes, which still do not rely on virtual functions.
parent aa3d366f
No related branches found
No related tags found
4 merge requests!2086CbmUtility library,!2085CbmContainers/OnlineContainers library,!2084Inclusion directives with full path to headers of Algo library,!1983Draft: New reco classes
Pipeline #33918 passed
......@@ -369,10 +369,7 @@ install(
base/RecoParams.h
base/SubChain.h
base/System.h
base/PartitionedVector.h
base/PartitionedSpan.h
base/DigiData.h
base/PODVector.h
base/AlgoTraits.h
base/AuxDigiData.h
base/BuildInfo.h
......
......@@ -22,7 +22,7 @@ namespace cbm
// static_assert(std::is_trivially_constructible_v<T>, "PODAllocator only works for POD types");
// Ensure T has no vtable
static_assert(std::is_standard_layout_v<T>, "PODAllocator only works with types with standard layout");
static_assert(!std::is_polymorphic_v<T>, "PODAllocator only works with types with non-polymorphic types");
using value_type = T;
......
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