Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-24801

Move definition of a template member to impl file fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • Qt Creator 4.14.0-beta2
    • Qt Creator 4.13.2
    • C/C++/Obj-C++ Support
    • 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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              kandeler Christian Kandeler
              qtjake Jake Helfert
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes