Skip to content

Commit

Permalink
properly ignore runtime mergeable check from Post Processing
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Tichák committed Nov 21, 2024
1 parent 1ff1237 commit 63c85c8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Framework/include/QualityControl/ObjectsManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,17 @@ class ObjectsManager
template <bool IgnoreMergeable = false, typename T>
void startPublishing(T obj, PublicationPolicy policy = PublicationPolicy::Forever)
{
// We don't want to do this compile time check in PostProcessing
// We don't want to do this compile time check in PostProcessing, and we want to turn off runtime check as well
bool ignoreMergeableRuntime = IgnoreMergeable;
#ifndef QUALITYCONTROL_POSTPROCESSINTERFACE_H
static_assert(std::same_as<std::remove_pointer_t<T>, TObject> ||
IgnoreMergeable || mergers::Mergeable<T>,
"you are trying to startPublishing object that is not mergeable."
" If you know what you are doing use startPublishing<true>(...)");
#else
ignoreMergeableRuntime = true;
#endif
startPublishingImpl(obj, policy, IgnoreMergeable);
startPublishingImpl(obj, policy, ignoreMergeableRuntime);
}

/**
Expand Down

0 comments on commit 63c85c8

Please sign in to comment.