Skip to content

Commit 4e343ae

Browse files
committed
[FIX] gcc15: Workaround bogus warning 2nd try
1 parent 5e792ae commit 4e343ae

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

include/sharg/detail/format_tdl.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,13 @@ class format_tdl : format_base
229229
store_help_page_element(
230230
[this, config, value, description, tags](std::string_view)
231231
{
232-
parameters.push_back(tdl::Node{
233-
.name = config.long_id,
234-
.description = description,
235-
.value = to_tdl(value),
236-
});
237-
// gcc 15 with hardened flags (fedora-flags) doesn't like having the move in the tdl::Node ctor.
238-
parameters.back().tags = std::move(tags);
232+
// gcc 15 with hardened flags (fedora-flags) doesn't like having the push_back as a one-liner.
233+
parameters.push_back(tdl::Node{.name = config.long_id, .description = description});
234+
235+
auto & node = parameters.back();
236+
node.tags = std::move(tags);
237+
node.value = to_tdl(value);
238+
239239
info.cliMapping.emplace_back("--" + config.long_id, config.long_id);
240240
},
241241
config);

0 commit comments

Comments
 (0)