Skip to content
  • Orgad Shaneh's avatar
    C++: Ignore explicit template instantiations · a77e3280
    Orgad Shaneh authored
    
    
    Defined in section 14.7.2 of the standard.
    
    Fixes completion for std::string.
    
    The following explicit instantiation appears in bits/basic_string.tcc:
      extern template class basic_string<char>;
    
    This is wrongfully considered a specialization for a forward declaration
    (like `template<> class basic_string<char>` is).
    
    Introduce a new Symbol type for explicit instantiations.
    
    Use-case:
    template<class T>
    struct Foo { T bar; };
    
    template class Foo<int>;
    
    void func()
    {
        Foo<int> foo;
        foo.bar; // bar not highlighted
    }
    
    Change-Id: I9e35c8c32f6b78fc87b4f4f1fc903b42cfbd2c2b
    Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
    a77e3280