From 3f85474087a7894a11a28adc089ebd1150c53ac6 Mon Sep 17 00:00:00 2001 From: Ezekiel Warren Date: Wed, 19 Jun 2024 13:54:16 -0700 Subject: [PATCH] fix: add missing return type in context.add --- .../cpp_systems_header_codegen.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cpp_systems_header_codegen/cpp_systems_header_codegen.cc b/cpp_systems_header_codegen/cpp_systems_header_codegen.cc index cb412c4..aa7474a 100644 --- a/cpp_systems_header_codegen/cpp_systems_header_codegen.cc +++ b/cpp_systems_header_codegen/cpp_systems_header_codegen.cc @@ -297,7 +297,7 @@ static void write_context_add_specialize( block( ctx, std::format( - "template<> auto add<{0}>(const {0}& new_component)", + "template<> auto add<{0}>(const {0}& new_component) -> void", cpp_full_name ), [&] { @@ -305,9 +305,11 @@ static void write_context_add_specialize( } ); } else { - block(ctx, std::format("template<> auto add<{}>()", cpp_full_name), [&] { - ctx.write(std::format("_ctx.add<{}>()", cpp_full_name)); - }); + block( + ctx, + std::format("template<> auto add<{}>() -> void", cpp_full_name), + [&] { ctx.write(std::format("_ctx.add<{}>()", cpp_full_name)); } + ); } ctx.write("\n");