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

Refactoring Template Members Generates wrong Code

XMLWordPrintable

    • Linux/Wayland, Linux/X11
    • 9c4ba3ff2 (master)

      Just wrote the following code in Qt Creator 10.0.2:
      template <typename Type1>
      struct Blob

      { template <typename Type2> void foo(); }

      ;

      and used Qt Creator's refactoring capability (Right clicked on `foo` -> Refactor -> Add Definition Outside Class) and it generated this:
      template<typename Type2>
      void Blob::foo<Type2>()
      {

      }
      which is 100% FALSE.
      BTW, CLion generates the right code, but Qt Creator, Does NOT.
      and I just checked Qt Creator 11, and still Qt Creator doesn't generate the right definition.

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

            artem.sokolovskii Artem Sokolovskii (Inactive)
            askrx0x Askr Askr
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes