diff --git a/include/fmt/compile.h b/include/fmt/compile.h index 40e1a5a0d142..fa0b2812b1de 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -368,7 +368,8 @@ template struct type_list {}; // Returns a reference to the argument at index N from [first, rest...]. template -constexpr const auto& get(const T& first, const Args&... rest) { +constexpr const auto& get([[maybe_unused]] const T& first, + [[maybe_unused]] const Args&... rest) { static_assert(N < 1 + sizeof...(Args), "index is out of bounds"); if constexpr (N == 0) return first;