Details
-
Bug
-
Resolution: Duplicate
-
P3: Somewhat important
-
None
-
Qt Creator 2.3.0
-
None
-
Arch Linux, KDE desktop environmant
Description
When you declare a move constructor in .h and you use Add Definition option, a definition that is added in the .cpp file contains a l-value reference type in the constructor's parameter list, instead of the r-value reference type.
Example:
If we this declaration in the simple.h file:
class Simple { public: Simple(); Simple(Simple &&simple); void SetName(QString &&newName); Simple& operator =(Simple &&simple); private: QString *m_name; };
and we use Add Definition option on the Simple(Simple &&simple) in the simple.cpp we will get this:
Simple::Simple(Simple &simple) { }
instead we need to get:
Simple::Simple(Simple &&simple) { }
Attachments
Issue Links
- is replaced by
-
QTCREATORBUG-10555 Refactor -> Add definition in 'file.cpp' gives wrong result with r-value (rvalue) reference.
- Closed
- relates to
-
QTCREATORBUG-903 Support for the upcoming c++0x
- Closed