Skip to content

Commit 94344f6

Browse files
committed
fixup! improve concepts
1 parent 0d2761f commit 94344f6

File tree

1 file changed

+4
-4
lines changed
  • Framework/Core/include/Framework

1 file changed

+4
-4
lines changed

Framework/Core/include/Framework/ASoA.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,13 @@ template <typename C>
186186
using is_persistent_column_t = std::conditional_t<is_persistent_column<C>, std::true_type, std::false_type>;
187187

188188
template <typename C>
189-
concept is_index_column = requires { requires not_void<typename C::binding_t>; };
189+
concept is_self_index_column = not_void<typename C::self_index_t> && std::same_as<typename C::self_index_t, std::true_type>;
190190

191191
template <typename C>
192-
using is_external_index_t = typename std::conditional_t<is_index_column<C>, std::true_type, std::false_type>;
192+
concept is_index_column = !is_self_index_column<C> && (requires {&C::getId;} || requires {&C::getIds;});
193193

194194
template <typename C>
195-
concept is_self_index_column = requires { typename C::self_index_t{}; };
195+
using is_external_index_t = typename std::conditional_t<is_index_column<C>, std::true_type, std::false_type>;
196196

197197
template <typename C>
198198
using is_self_index_t = typename std::conditional_t<is_self_index_column<C>, std::true_type, std::false_type>;
@@ -1793,7 +1793,7 @@ class Table
17931793
if constexpr (framework::has_type<decayed>(bindings_pack_t{})) { // index to another table
17941794
constexpr auto idx = framework::has_type_at_v<decayed>(bindings_pack_t{});
17951795
return framework::pack_element_t<idx, external_index_columns_t>::getId();
1796-
} else if constexpr (std::is_same_v<decayed, Parent>) { // self index
1796+
} else if constexpr (std::same_as<decayed, Parent>) { // self index
17971797
return this->globalIndex();
17981798
} else if constexpr (is_indexing_column<decayed>) { // soa::Index<>
17991799
return this->globalIndex();

0 commit comments

Comments
 (0)