Add getter to retrieve main entity being outputted
This commit is contained in:
parent
bb8a915279
commit
17ef990bb2
2 changed files with 14 additions and 2 deletions
|
|
@ -1099,7 +1099,10 @@ namespace
|
|||
|
||||
bool cppast::generate_code(code_generator& generator, const cpp_entity& e)
|
||||
{
|
||||
return generate_code_impl(generator, e, cpp_public);
|
||||
generator.main_entity_ = type_safe::ref(e);
|
||||
auto result = generate_code_impl(generator, e, cpp_public);
|
||||
generator.main_entity_ = nullptr;
|
||||
return result;
|
||||
}
|
||||
|
||||
void detail::write_template_arguments(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue