On 13.01.2018 21:49, Timon Gehr wrote:

auto (name, email) = fetchUser();
    vs
auto {name, email} = fetchUser();


BTW: What do you think each of those do?
I'd expect the following:

---
auto (name, email) = fetchUser();
=>
auto __tmp = fetchUser();
auto name = __tmp[0], email = __tmp[1];
---

---
auto {name, email} = fetchUser();
=>
auto __tmp = fetchUser();
auto name = __tmp.name, email = __tmp.email;
---

The DIP proposes only the first one of those features, and only for AliasSeq's or types that alias this to an AliasSeq (such as tuples).

Reply via email to