From d95dbd6934a77044336cf8ce0e8a4a1efdd2e849 Mon Sep 17 00:00:00 2001 From: Seokjin Lee <seokjin.dev@gmail.com> Date: Wed, 12 Aug 2020 10:49:40 +0900 Subject: [PATCH 1/2] fix: warning C4100: unreferenced formal parameter Add [[maybe_unused]] to fix it. --- include/fmt/compile.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/compile.h b/include/fmt/compile.h index 40e1a5a0d142..b9f4e8dc7862 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -368,7 +368,7 @@ 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; From 1b967ad2edd9d1f6b06cbc939c7c143f3c6fb7e4 Mon Sep 17 00:00:00 2001 From: Seokjin Lee <seokjin.dev@gmail.com> Date: Wed, 12 Aug 2020 13:13:33 +0900 Subject: [PATCH 2/2] Apply clang-format --- include/fmt/compile.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b9f4e8dc7862..fa0b2812b1de 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -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([[maybe_unused]] const T& first, [[maybe_unused]] 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;