From c8d8b88223699e6876915911a5ddd419f029b56f Mon Sep 17 00:00:00 2001 From: Alexey Ochapov Date: Sat, 13 Mar 2021 17:36:53 +0300 Subject: [PATCH] fix GCC 7,8,9 warning about unused but set parameter (#2177) --- include/fmt/compile.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/fmt/compile.h b/include/fmt/compile.h index 49774099..fc419266 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -557,9 +557,10 @@ template struct runtime_named_field { basic_string_view name; template - constexpr static bool try_format_argument(OutputIt& out, - basic_string_view arg_name, - const T& arg) { + constexpr static bool try_format_argument( + OutputIt& out, + // [[maybe_unused]] due to unused-but-set-parameter warning in GCC 7,8,9 + [[maybe_unused]] basic_string_view arg_name, const T& arg) { if constexpr (is_named_arg::type>::value) { if (arg_name == arg.name) { out = write(out, arg.value);