diff --git a/include/podio/detail/RelationIOHelpers.h b/include/podio/detail/RelationIOHelpers.h index b0fe1b60d..1ef2ee0ca 100644 --- a/include/podio/detail/RelationIOHelpers.h +++ b/include/podio/detail/RelationIOHelpers.h @@ -49,8 +49,7 @@ void tryAddTo(T, std::vector& relElements, const podio::Collectio template void addInterfaceToMultiRelation(std::vector& relElements, const podio::CollectionBase* coll, const podio::ObjectID id) { - std::apply([&relElements, &coll, &id](auto... t) { (tryAddTo(t, relElements, coll, id), ...); }, - typename InterfaceType::interfaced_types{}); + std::apply([&](auto... t) { (tryAddTo(t, relElements, coll, id), ...); }, typename InterfaceType::interfaced_types{}); } /// Helper function for adding an object to the OneToManyRelations container @@ -132,8 +131,7 @@ void tryAssignTo(T, InterfaceType*& relation, const podio::CollectionBase* coll, template void addInterfaceToSingleRelation(InterfaceType*& relation, const podio::CollectionBase* coll, const podio::ObjectID id) { - std::apply([&relation, &coll, &id](auto... t) { (tryAssignTo(t, relation, coll, id), ...); }, - typename InterfaceType::interfaced_types{}); + std::apply([&](auto... t) { (tryAssignTo(t, relation, coll, id), ...); }, typename InterfaceType::interfaced_types{}); } /// Helper function for assigning the related object in a OneToOneRelation