Skip to content

Commit 3f85474

Browse files
committed
fix: add missing return type in context.add
1 parent e8ab85f commit 3f85474

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

cpp_systems_header_codegen/cpp_systems_header_codegen.cc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,17 +297,19 @@ static void write_context_add_specialize(
297297
block(
298298
ctx,
299299
std::format(
300-
"template<> auto add<{0}>(const {0}& new_component)",
300+
"template<> auto add<{0}>(const {0}& new_component) -> void",
301301
cpp_full_name
302302
),
303303
[&] {
304304
ctx.write(std::format("_ctx.add<{}>(new_component)", cpp_full_name));
305305
}
306306
);
307307
} else {
308-
block(ctx, std::format("template<> auto add<{}>()", cpp_full_name), [&] {
309-
ctx.write(std::format("_ctx.add<{}>()", cpp_full_name));
310-
});
308+
block(
309+
ctx,
310+
std::format("template<> auto add<{}>() -> void", cpp_full_name),
311+
[&] { ctx.write(std::format("_ctx.add<{}>()", cpp_full_name)); }
312+
);
311313
}
312314

313315
ctx.write("\n");

0 commit comments

Comments
 (0)