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

"Add Definition in cxx" Refactoring tool ignores constexpr

    XMLWordPrintable

Details

    • Windows

    Description

      Steps to reproduce:

      1. Have a C++ class with a .h and a .cxx file
      2. Add a method declaration in the header with constexpr
      3. Implement it with the Refactoring Tool "Add Definition in cxx"
      4. -> constexpr is not added in the cxx
      // in .h
      Class ClassName {
          constexpr int test();
      }
      
      // -> Refactor > Add Definition in cxx results in this, which will not compile
      
      int ClassName::test()
      {
      
      }
      
      // The correct code would be
      constexpr int ClassName::test() 
      {
      
      }
      

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            alfu alfu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes