Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] what exactly is stored in the index?

> Lets consider a case involving template specialization: 
>  
> template <typename T> class A {}; 
>  
> template <> class A<int> { A(const char* s) {} } 
>  
> void f() 
> { 
>           typedef int Int; 
>           A<Int> a(""); 
> } 
>  
> 'A' in 'A<Int> a("");' is a reference to template class A and a("")  
> contains an implicit reference to constructor A<int>::A(const char*).  
> It looks like these are the only two references that we need for search  
> and rename refactoring. The reference to the template specialization  
> A<int> is not needed since rename refactoring does not need it and  
> C/C++ search cannot search for specializations. 
>  
> -sergey 

Got it, thanks! So the bug is that we are attempting to store 'A<Int>'
in the index at all. We shouldn't be, because we don't need it.

Regards,
Nate
 		 	   		  

Back to the top