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

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

      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'
      }
      

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

            kosjar Nikolai Kosjar
            kosjar Nikolai Kosjar
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes