-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
Qt Creator 16.0.2
-
-
49d300474 (master)
There are two files (one header file and its implementation file) in a C++ static-library project:
ClassA.h
ClassA.cpp
ClassA.h has the following:
template<typename... Args> class ClassA { public: explicit ClassA(Args&&... args); ~ClassA(); private: std::tuple<Args...> values; };
Inside the Qt Creator's text editor, bring the mouse-cursor over the name of the constructor and press the right-click to open the context menu. Select "Refactor" -> "Add Definition in ClassA.cpp".
It auto-generates incorrect constructor definition:
template<typename Args> ClassA<Args>::ClassA(Args &&args) { }
The correct constructor definition is:
template<typename... Args> ClassA<Args...>::ClassA(Args&&... args) { }
Same is with auto-generation of any member functions of ClassA (if you add some). It omits the three dots.
For Gerrit Dashboard: QTCREATORBUG-32597 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
676626,3 | CppEditor: Support parameter packs in refactoring operations | master | qt-creator/qt-creator | Status: MERGED | +2 | +1 |