Skip to content

Commit a8f1f1f

Browse files
committed
[FIX] gcc-15 and clang-20
1 parent 9676e03 commit a8f1f1f

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

include/sharg/detail/format_tdl.hpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,13 @@ class format_tdl : format_base
214214
tags.insert("output");
215215
}
216216

217-
parameters.push_back(tdl::Node{
218-
.name = config.long_id,
219-
.description = description,
220-
.tags = std::move(tags),
221-
.value = tdl::StringValue{valueAsStr},
222-
});
217+
// gcc 15 doesn't like having the push_back as a one-liner.
218+
parameters.push_back(tdl::Node{.name = config.long_id, .description = description});
219+
220+
auto & node = parameters.back();
221+
node.tags = std::move(tags);
222+
node.value = tdl::StringValue{valueAsStr};
223+
223224
info.cliMapping.emplace_back("--" + config.long_id, config.long_id);
224225
},
225226
config);

include/sharg/detail/type_name_as_string.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# include <cxxabi.h>
1414
#endif // defined(__GNUC__) || defined(__clang__)
1515

16+
#include <cstdlib>
1617
#include <functional>
1718
#include <memory>
1819
#include <string>

0 commit comments

Comments
 (0)