Under g++ 7.4 I could declare and initialize multiple variables like so:
std::pair<T, T> foo();
int main ()
{ auto [a, b] = foo(); }
However under Apple clang-703 it gives me an error.
I could not find any information about support for this feature in both compilers. Is it supported by modern compilers or should I not use it? Also what is the name of the feature?
Edit: The error is:
auto [a, b] = foo();
^1 ^2
1 => use of undeclared identifier 'a'.
2 => expected unqualified-id.