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

Grégoire Barbier devel at g76r.eu
Mon Jul 24 21:32:48 CEST 2017


Le 24/07/2017 à 18:45, Henry Skoglund a écrit :
>      QMap m1 = {std::pair{2,"score"}, {4,"seven"}, {1,"Four"}, 
> {5,"years"}, {3,"and"}, {6,"ago"}};

Or even this:

QMap<int, const char*> m1 { {2, "score"}, {4, "seven"}, };

-- 
Grégoire Barbier :: g à g76r.eu



More information about the Development mailing list