the answer has to be no, primarily because the size of an initializer_list is dynamic whereas the list of introduced names is static.
3.2 Should this syntax support initialization from a braced-init-list?
For example:
auto [x,y,z] = {1, “xyzzy”s, 3.14159}; // NOT proposed
We think the answer should be no. This would be trivial to add, but should be well motivated and we know of no use cases where this offers additional expressive power not already available (and with greater clarity) using individual variable declarations. This can always be proposed separately later as a pure extension if desired.
а это от куда?
Обсуждают сегодня