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

C++11 Syntax error on second lambda with same return type using new function declarator syntax

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P4: Low
    • None
    • Qt Creator 2.7.0
    • C/C++/Obj-C++ Support
    • None

    Description

      The second lambda is highlighted as an error, whereas it compiles fine.

      int main()
      {
          [] () -> int {}; // This line is necessary to trigger the error.
          [] () -> void {}; // Highlighted as syntax error, 'duplicate data type in declaration'
      }
      

      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
              kosjar Nikolai Kosjar
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes