Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
Qt Creator 15.0.0
Description
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.