Skip to content

Commit dbd4724

Browse files
committed
improve checks
1 parent 0285836 commit dbd4724

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Framework/Core/include/Framework/ASoA.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ template <template <o2::framework::OriginEnc, typename...> class base, typename
139139
inline constexpr bool is_base_of_template_origin_v = is_base_of_template_origin<base, derived>::value;
140140

141141
template <typename T>
142-
concept not_void = requires { !std::same_as<T, void>; };
142+
concept not_void = !std::same_as<T, void>;
143143

144144
// column identification concepts
145145
template <typename C>
@@ -209,7 +209,7 @@ template <typename T>
209209
concept has_parent_t = not_void<typename T::parent_t>;
210210

211211
template <typename T>
212-
concept has_metadata = soa::not_void<typename aod::MetadataTrait<T>::metadata>;
212+
concept has_metadata = not_void<typename aod::MetadataTrait<T>::metadata>;
213213

214214
template <typename T>
215215
concept is_spawnable_column = std::is_same_v<typename T::spawnable_t, std::true_type>;

Framework/Core/include/Framework/AnalysisManagers.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ struct ServiceManager<Service<T>> {
452452

453453
static bool prepare(InitContext& context, Service<T>& service)
454454
{
455-
if constexpr (requires { T::instance(); }) {
455+
if constexpr (requires { &T::instance; }) {
456456
service.service = &(T::instance()); // Sigh...
457457
return true;
458458
} else {
@@ -467,7 +467,7 @@ struct ServiceManager<Service<T>> {
467467
{
468468
// FIXME: for the moment we only need endOfStream to be
469469
// stateless. In the future we might want to pass it EndOfStreamContext
470-
if constexpr (requires(T t) { t.endOfStream(); }) {
470+
if constexpr (requires { &T::endOfStream; }) {
471471
service.service->endOfStream();
472472
return true;
473473
}
@@ -619,7 +619,7 @@ struct IndexManager {
619619
static bool requestInputs(std::vector<InputSpec>&, T const&) { return false; };
620620
};
621621

622-
template <typename IDX>
622+
template <soa::is_index_table IDX>
623623
struct IndexManager<Builds<IDX>> {
624624
static bool requestInputs(std::vector<InputSpec>& inputs, Builds<IDX>& builds)
625625
{

0 commit comments

Comments
 (0)