https://bugs.kde.org/show_bug.cgi?id=378090

            Bug ID: 378090
           Summary: Function override from code completion gets wrong
                    signature for templates
           Product: kdevelop
           Version: 5.1.0
          Platform: Compiled Sources
                OS: Linux
            Status: UNCONFIRMED
          Severity: minor
          Priority: NOR
         Component: Language Support: CPP (Clang-based)
          Assignee: kdevelop-bugs-n...@kde.org
          Reporter: nicolas.alva...@gmail.com
  Target Milestone: ---

If a class template 'Base' has a virtual function with template parameters as
function parameter types, and I use code completion to override it from a
derived class, the override still shows the template parameter (like 'T')
instead of the actual type.

For example:

template<typename T>
struct Base {
    virtual void foo(const T& x){}
};

struct Derived: public Base<int>
{
    // trying to override 'foo' using code completion here will write:
    void foo(const T & x) override;
    // instead it should replace 'T' with 'int'
};

// another case:
template<typename ObjType>
struct Derived2: public Base<ObjType>
{
    // code completion here will also write:
    void foo(const T & x) override;
    // it should use the correct template parameter 'ObjType' instead of 'T'
};

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to