Skip to content

Commit facfac2

Browse files
refactor: Improve apply_runtime_fence function parameter types and condition check
1 parent 570e309 commit facfac2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/operations/invoker.cppm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -781,13 +781,13 @@ constexpr auto make_div_zero(char const *reason)
781781
return make_error<CommonRep>(policy::error::kind::divide_by_zero, reason);
782782
}
783783

784-
constexpr auto apply_runtime_fence(bool enabled,
785-
std::memory_order order) noexcept -> void {
784+
constexpr auto apply_runtime_fence(const bool enabled,
785+
const std::memory_order order) noexcept -> void {
786786
if (!enabled) {
787787
return;
788788
}
789789

790-
if (!std::is_constant_evaluated()) {
790+
if !consteval {
791791
std::atomic_thread_fence(order);
792792
}
793793
}

0 commit comments

Comments
 (0)