Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 4.14.0
-
None
-
-
bfb63acb09880f9cb2853b5e284a3202de8eab52 (qt-creator/qt-creator/4.14)
Description
I'm trying to define a method of some template class outside the class declaration. For example:
// declare class template template <typename T> class Foo { void bar(); }; // define class method template <typename T> void Foo<T>::bar() // bar is successfully autocompleted {}
When I type Foo<T>::b and press Ctrl+Space in the example above the code completion works fine.
But if I enclose the code above into some namespace then the code completion is broken. For example, when I type Foo<T>::b and press Ctrl+Space in the code below there is no completion suggested:
namespace foo_bar { template <typename T> class Foo { void bar(); }; // template <typename T> void Foo<T>::bar() // bar IS NOT autocompleted {} }
Though, if I either use the full class name with namespace prefix or define the method after using namespace then the autocompletion works again, see below:
namespace foo_bar { template <typename T> class Foo { void bar(); }; } // either template <typename T> void foo_bar::Foo<T>::bar() // bar is successfully autocompleted {} // or using namespace foo_bar; template <typename T> void Foo<T>::bar() // bar is successfully autocompleted {}
Attachments
For Gerrit Dashboard: QTCREATORBUG-25244 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
330851,2 | clangbackend: Fix missing completion for private member functions | 4.14 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |