Bug 325476 - no autocomplete when doing template specialization
Summary: no autocomplete when doing template specialization
Status: RESOLVED NOT A BUG
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (other bugs)
Version First Reported In: git master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-30 22:20 UTC by Marcel Hellwig
Modified: 2016-04-22 07:17 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Autosuggestion of the method for the instance of a templatized class (192.72 KB, image/png)
2016-04-22 06:51 UTC, chaitanya srinivas ponnapalli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel Hellwig 2013-09-30 22:20:57 UTC
There is not auto complete when using template specialization. Here is a minimal code example

  template <class Arg>
  class Test;
  
  template <class Arg>
  class Test<void(Arg)>
  {
  public:
      foo();
  };
  
  void bar()
  {
      Test t;
      t.
  }

After t. and Ctrl+Space there is no autocomplete, but it should. I know this is really hard for kdevelop to find out, but please make this working.

Reproducible: Always

Steps to Reproduce:
1. Copy the code
2. Paste the code
3. Press Ctrl+Space after t.
Actual Results:  
auto complete word

Expected Results:  
auto complete function
Comment 1 chaitanya srinivas ponnapalli 2016-04-22 06:51:02 UTC
Created attachment 98502 [details]
Autosuggestion of the method for the instance of a templatized class
Comment 2 chaitanya srinivas ponnapalli 2016-04-22 06:57:40 UTC
Hi Marcel,

Reproduced the steps. The autosuggestion of the method for the instance of template class does show up. Made slight change in the way the method was declared in the template class, by declaring the return type for the method. This is because as you know, a type specifier is required for all declarations in c++.
Comment 3 Kevin Funk 2016-04-22 07:17:10 UTC
Marking this bug as invalid. The initial code example has invalid code.
a) no return type for `foo`
b) use of class 'Test' requires template arguments.

Fixing (a) + (b) fixes the problem and KDevelop 5.0 successfully provides completion hints.

Code:
```
      Test<void(int)> t;
      t.
```