Skip to content

Commit 5ca2668

Browse files
committed
if consteval
Signed-off-by: Martijn Govers <[email protected]>
1 parent ad8013d commit 5ca2668

File tree

1 file changed

+1
-1
lines changed
  • power_grid_model_c/power_grid_model/include/power_grid_model/common

1 file changed

+1
-1
lines changed

power_grid_model_c/power_grid_model/include/power_grid_model/common/common.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ template <typename T> constexpr T map_to_cyclic_range(T value, T period) {
116116
if constexpr (std::is_integral_v<T>) {
117117
return static_cast<T>((value % period + period) % period);
118118
} else {
119-
if (std::is_constant_evaluated()) {
119+
if consteval {
120120
T quotient = value / period;
121121
Idx const floored_quotient =
122122
(quotient >= T{0}) ? static_cast<Idx>(quotient) : static_cast<Idx>(quotient) - 1;

0 commit comments

Comments
 (0)