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

No support for structured bindings

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: Qt Creator 4.5.0-beta1
    • Fix Version/s: None
    • Component/s: C/C++/Obj-C++ Support
    • Labels:
      None
    • Environment:
      MacOS High Sierra 10.13

      XCode 9

      clang: Apple LLVM version 9.0.0 (clang-900.0.37)

      Description

      Consider this code snippet:

      std::tuple< MyClass, MyClass > getTwoObjects()
      {
          return std::make_tuple( MyClass{}, MyClass{} );
      }
      
      void someFunction()
      {
          auto [ c1, c2 ] = getTwoObjects();
          c1.doSomething( c2 );
      }

      Although this code compiles successfully, QtCreator underlines the structured binding line with error expected unqualified id and then on next line with use of undeclared identifier c1 (also for c2).

      I am using Clang Code Model and my system clang supports structured bindings.

        Attachments

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

          Activity

            People

            • Assignee:
              kosjar Nikolai Kosjar
              Reporter:
              dodoent Nenad Miksa
            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes