Expand duplicate definition check
This commit is contained in:
parent
135e4d65e8
commit
c4a47b38c5
1 changed files with 2 additions and 1 deletions
|
|
@ -25,7 +25,8 @@ void cpp_entity_index::register_definition(cpp_entity_id
|
|||
{
|
||||
// already in map, override declaration
|
||||
auto& value = result.first->second;
|
||||
if (value.is_definition && !is_template(value.entity->kind()))
|
||||
if (value.is_definition && !is_template(value.entity->kind()) && entity->parent()
|
||||
&& !is_template(entity->parent().value().kind()))
|
||||
// allow duplicate definition of templates
|
||||
// this handles things such as SFINAE
|
||||
throw duplicate_definition_error();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue