It was hard to deduce from the proposal.
Will C++17 structured bindings initialize their identifiers from left to right?
Is this guaranteed to print "first", "second", then "third"?
#include <iostream>
struct A{ A(){std::cout << "first\n"; } };
struct B{ B(){std::cout << "second\n"; } };
struct C{ C(){std::cout << "third\n"; } };
struct D{
A first;
B second;
C third;
};
auto f(){
return D{};
}
int main (){
auto [a,b,c] = f();
}