Skip to content

Commit 5efb6e2

Browse files
authored
DPL Analysis: avoid base_of_template in concepts for column type identification (#13889)
1 parent b8be78a commit 5efb6e2

File tree

1 file changed

+12
-8
lines changed
  • Framework/Core/include/Framework

1 file changed

+12
-8
lines changed

Framework/Core/include/Framework/ASoA.h

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -786,27 +786,31 @@ struct Index : o2::soa::IndexColumn<Index<START, END>> {
786786
static constexpr const char* mLabel = "Index";
787787
using type = int64_t;
788788

789-
using bindings_t = typename o2::framework::pack<>;
790-
std::tuple<> boundIterators;
791789
std::tuple<int64_t const*, int64_t const*> rowIndices;
792790
/// The offsets within larger tables. Currently only
793791
/// one level of nesting is supported.
794792
std::tuple<uint64_t const*> rowOffsets;
795793
};
796794

797-
template <typename D>
798-
concept is_indexing_column = requires {
799-
[]<int64_t S, int64_t E>(o2::soa::Index<S, E>*) {}(std::declval<D*>());
795+
template <typename C>
796+
concept is_indexing_column = requires(C& c) {
797+
c.rowIndices;
798+
c.rowOffsets;
800799
};
801800

802-
template <typename T>
803-
concept is_dynamic_column = framework::base_of_template<soa::DynamicColumn, T>;
801+
template <typename C>
802+
concept is_dynamic_column = requires(C& c) {
803+
c.boundIterators;
804+
};
805+
806+
template <typename C>
807+
concept is_marker_column = requires { &C::mark; };
804808

805809
template <typename T>
806810
using is_dynamic_t = std::conditional_t<is_dynamic_column<T>, std::true_type, std::false_type>;
807811

808812
template <typename T>
809-
concept is_column = framework::base_of_template<soa::Column, T> || is_dynamic_column<T> || is_indexing_column<T> || framework::base_of_template<soa::MarkerColumn, T>;
813+
concept is_column = is_persistent_column<T> || is_dynamic_column<T> || is_indexing_column<T> || is_marker_column<T>;
810814

811815
template <typename T>
812816
using is_indexing_t = std::conditional_t<is_indexing_column<T>, std::true_type, std::false_type>;

0 commit comments

Comments
 (0)