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

No support for structured bindings

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Not Evaluated
    • None
    • Qt Creator 4.5.0-beta1
    • C/C++/Obj-C++ Support
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes