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

C++ out-of-line default-defined special member functions not recognized

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • Qt Creator 2.7.0, Qt Creator 2.8.0-beta
    • C/C++/Obj-C++ Support
    • None

    Description

      When the user writes an out-of-line default definition of a special member function, Qt Creator underlines it in red and upon mouseover displays "unexpected token `default'". This syntax is, however, valid C++11 code and compiles when the compiler supports default definitions.

      Example:

      class Example
      {
        Example();
      };
      
      Example::Example() = default;
      

      The last line gets underlined.

      Attachments

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

        Activity

          People

            erikv Erik Verbruggen
            dostende Jo Bates
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes