From 05c289ff6c542ee6fd29baf2e670bb4d555b66e4 Mon Sep 17 00:00:00 2001 From: Anton Alkin Date: Wed, 22 Jan 2025 11:30:43 +0100 Subject: [PATCH 1/2] DPL Analysis: avoid base_of_template in concepts for column type identification --- Framework/Core/include/Framework/ASoA.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/Framework/Core/include/Framework/ASoA.h b/Framework/Core/include/Framework/ASoA.h index 7b0b69ec8941f..fd2506a2c86b7 100644 --- a/Framework/Core/include/Framework/ASoA.h +++ b/Framework/Core/include/Framework/ASoA.h @@ -786,27 +786,31 @@ struct Index : o2::soa::IndexColumn> { static constexpr const char* mLabel = "Index"; using type = int64_t; - using bindings_t = typename o2::framework::pack<>; - std::tuple<> boundIterators; std::tuple rowIndices; /// The offsets within larger tables. Currently only /// one level of nesting is supported. std::tuple rowOffsets; }; -template -concept is_indexing_column = requires { - [](o2::soa::Index*) {}(std::declval()); +template +concept is_indexing_column = requires (C& c) { + c.rowIndices; + c.rowOffsets; }; -template -concept is_dynamic_column = framework::base_of_template; +template +concept is_dynamic_column = requires (C& c) { + c.boundIterators; +}; + +template +concept is_marker_column = requires { &C::mark; }; template using is_dynamic_t = std::conditional_t, std::true_type, std::false_type>; template -concept is_column = framework::base_of_template || is_dynamic_column || is_indexing_column || framework::base_of_template; +concept is_column = is_persistent_column || is_dynamic_column || is_indexing_column || is_marker_column; template using is_indexing_t = std::conditional_t, std::true_type, std::false_type>; From 180222534074ec57897bf1838eea1060a0d5a366 Mon Sep 17 00:00:00 2001 From: Anton Alkin Date: Wed, 22 Jan 2025 11:33:13 +0100 Subject: [PATCH 2/2] fixup! DPL Analysis: avoid base_of_template in concepts for column type identification --- Framework/Core/include/Framework/ASoA.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Framework/Core/include/Framework/ASoA.h b/Framework/Core/include/Framework/ASoA.h index fd2506a2c86b7..22afdb3812dbf 100644 --- a/Framework/Core/include/Framework/ASoA.h +++ b/Framework/Core/include/Framework/ASoA.h @@ -793,13 +793,13 @@ struct Index : o2::soa::IndexColumn> { }; template -concept is_indexing_column = requires (C& c) { +concept is_indexing_column = requires(C& c) { c.rowIndices; c.rowOffsets; }; template -concept is_dynamic_column = requires (C& c) { +concept is_dynamic_column = requires(C& c) { c.boundIterators; };