fix: warning C4100: unreferenced formal parameter (#1814)

Add [[maybe_unused]] to fix it.
This commit is contained in:
Seokjin Lee 2020-08-12 22:57:22 +09:00 committed by GitHub
parent fb0aeb8209
commit 4b69c78751
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;