Details
-
Bug
-
Resolution: Cannot Reproduce
-
Not Evaluated
-
None
-
Qt Creator 4.5.0-beta1
-
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.