Closed oracleyue closed 6 years ago
I can confirm this behavior, this also holds for any templated function/method. try:
template <typename T>
void foo(){
typename std::vector<T> temp;
temp.<TAB>
}
It would be nice to have this fixed, if I only knew how...
The issue I reported before was not precise, Sorry. Most times, the following issues I described before won't happen. (Now it works well. My problem happened before was ac-completion didn't work for containers using user-defined classes in any context. It works after I recompiled clang-complete-async and upgraded Clang.) However, it fails to complete when these containers or template classes use template parameters in the declarations or definitions of template classes or functions, as reported by psteinb on the second floor.
FYI, an example
~~If the template parameter is a user-defined class (classes in the C++ standard library works well), it fails to complete. For instance,
std::vector<double> var
; when typevar.
, it works well; However,std::vector<class_type> var
, when typevar.
, it fails to prompt any completions. No candidates appear. It seems that a class as template parameters stops the complete function. Please help to check it. At least, update it to complete the original member functions of the container (likevector
,map
), by ingoring its template parameters. Thanks a lot!~~