[Development] How to make a fancy QMap c++17 initializer_list

Thiago Macieira thiago.macieira at intel.com
Wed Jul 26 00:33:42 CEST 2017


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?

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list