On 26 July 2017 at 01:33, Thiago Macieira <[email protected]> wrote: > On terça-feira, 25 de julho de 2017 15:03:17 PDT Marc Mutz wrote: >> A nested brace initializer does not have a type, if the types used in >> the inner braces are distinct, so >> >> std::map m = {{k1, v1}, {k2, v2}}; >> >> will not work, even if the compiler implements the DR that you find >> referenced from the cppreference link Henry posted. AFAIU, this would >> need more language support than what we find in C++17. Ville can >> probably tell if there are proposals on the table to enable this. > > Even with the deduction guide?
Even with the guide. See https://wandbox.org/permlink/qH4LrE4EfEQ5C6hU and experiment with what happens when the mention of pair is removed. The end result is not very nice, and I am not aware of any proposals to fix it. _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
