Skip to content

Commit

Permalink
fix: warning C4100: unreferenced formal parameter (#1814)
Browse files Browse the repository at this point in the history
Add [[maybe_unused]] to fix it.
  • Loading branch information
Othereum authored Aug 12, 2020
1 parent fb0aeb8 commit 4b69c78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/fmt/compile.h
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,8 @@ template <typename... Args> struct type_list {};

// Returns a reference to the argument at index N from [first, rest...].
template <int N, typename T, typename... Args>
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;
Expand Down

0 comments on commit 4b69c78

Please sign in to comment.