mirror of
https://github.com/fmtlib/fmt.git
synced 2025-03-01 01:13:32 +00:00
fix: warning C4100: unreferenced formal parameter (#1814)
Add [[maybe_unused]] to fix it.
This commit is contained in:
parent
fb0aeb8209
commit
4b69c78751
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user