Skip to content

Commit

Permalink
Always inline const_check for clang
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Dec 24, 2024
1 parent 28d1abc commit 91e15b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/fmt/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,9 @@ constexpr auto is_constant_evaluated(bool default_value = false) noexcept
}

// Suppresses "conditional expression is constant" warnings.
template <typename T> constexpr auto const_check(T value) -> T { return value; }
template <typename T> FMT_ALWAYS_INLINE constexpr auto const_check(T val) -> T {
return val;
}

FMT_NORETURN FMT_API void assert_fail(const char* file, int line,
const char* message);
Expand Down

0 comments on commit 91e15b9

Please sign in to comment.