Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
Qt Creator 4.13.2
-
None
-
Linux ubuntu 20.04, creator 4.13.2, qt 5.15.1
-
d2ebc16b92cfe10eff6b379b32cb0e07329f29df (qt-creator/qt-creator/4.14)
Description
When using the "move to implementation file" command to move the definition of a method of a template out of the header, creator generates an incorrect signature.
Given the code below:
template <typename T>
{{ class Delegate}}
{{ {}}
{{ public:}}
{{ void Invoke()}}
{{ {}}
{{ }}}
{{ };}}template <typename T>
{{ class SomeClass}}
{{ {}}
{{ Delegate<void(int)> _d;}}public:
{{ SomeClass(Delegate<void(int)>)}}
{{ {}}} qtcbug.cpp
{{ };}}
Move the definition of the SomeClass ctor into its implementation file.
The generated result is:
template<typename T>SomeClass::SomeClass(Delegate<void (int)>){}
which should be:
template<typename T> SomeClass<T>::SomeClass(Delegate<void (int)>)
Attachments
Issue Links
- relates to
-
QTCREATORBUG-24233 Move definition outside class ill-formed for template class
- Closed
-
QTCREATORBUG-24848 Add or Move defn of class template method fails (different from bug 24801)
- Closed