Parse cpp_class_template

This commit is contained in:
Jonathan Müller 2017-03-27 11:34:51 +02:00
commit 22fd582756
12 changed files with 289 additions and 56 deletions

View file

@ -58,9 +58,14 @@ namespace cppast
/// \effects Registers the template.
/// \returns The finished template.
std::unique_ptr<T> finish(const cpp_entity_index& idx, cpp_entity_id id)
std::unique_ptr<T> finish(const cpp_entity_index& idx, cpp_entity_id id,
bool is_definition)
{
idx.register_definition(std::move(id), type_safe::cref(*template_entity));
if (is_definition)
idx.register_definition(std::move(id), type_safe::cref(*template_entity));
else
idx.register_forward_declaration(std::move(id),
type_safe::cref(*template_entity));
return std::move(template_entity);
}