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

Refactoring: noexcept is not forwarded when Insert Virtual Functions action is used

    XMLWordPrintable

Details

    • 54fefd89b86f9b7c3496317bcfcf3882ff72e67c (qt-creator/qt-creator/4.11)

    Description

      When the base class contains non-throwing virtual functions e.g.

      class Base {
          virtual void f() noexcept;
          virtual void g();
      };
      class Derived : public Base {
      };
      

      Then using Insert Virtual Functions refactoring action results to

      class Derived : public Base {
          void f();
          void g();
      }
      

      As each overrider of non-throwing virtual function must be non-throwing, the derived functions must specify noexcept. Thus the current result is ill-formed.

      Attachments

        Issue Links

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

          Activity

            People

              kosjar Nikolai Kosjar
              qtcomsupport Qt Support
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes