mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-28 15:28:35 +00:00
fix GCC 7,8,9 warning about unused but set parameter (#2177)
This commit is contained in:
parent
d28101878a
commit
c8d8b88223
@ -557,9 +557,10 @@ template <typename Char> struct runtime_named_field {
|
||||
basic_string_view<Char> name;
|
||||
|
||||
template <typename OutputIt, typename T>
|
||||
constexpr static bool try_format_argument(OutputIt& out,
|
||||
basic_string_view<Char> 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<Char> arg_name, const T& arg) {
|
||||
if constexpr (is_named_arg<typename std::remove_cv<T>::type>::value) {
|
||||
if (arg_name == arg.name) {
|
||||
out = write<Char>(out, arg.value);
|
||||
|
Loading…
Reference in New Issue
Block a user