diff --git a/Framework/Core/include/Framework/ASoA.h b/Framework/Core/include/Framework/ASoA.h index 4273c79a57eed..fc5c9cac4a2e5 100644 --- a/Framework/Core/include/Framework/ASoA.h +++ b/Framework/Core/include/Framework/ASoA.h @@ -781,6 +781,11 @@ struct ColumnDataHolder { arrow::ChunkedArray* second; }; +template +concept HasBinding = requires(T& t) { + { t.B::mColumnIterator }; +}; + template struct RowViewCore : public IP, C... { public: @@ -964,7 +969,23 @@ struct RowViewCore : public IP, C... { template auto bindDynamicColumn(framework::pack) { - DC::boundIterators = std::make_tuple(&(B::mColumnIterator)...); + DC::boundIterators = std::make_tuple(getDynamicBinding()...); + } + + // Sometimes dynamic columns are defined for tables in + // the hope that it will be joined / extended with another one which provides + // the full set of bindings. This is to avoid a compilation + // error if constructor for the table or any other thing involving a missing + // binding is preinstanciated. + template + requires (HasBinding) + auto getDynamicBinding() { + return &B::mColumnIterator; + } + + template + auto getDynamicBinding() { + return nullptr; } };