mardi 20 mars 2018

How to access internal typedefs by taking the type from a variable?

If I have a variable of type std::unordered_map<aaa, bbb>, how can I access the std::unordered_map<aaa, bbb>::iterator typedef without having to always write the type itself but, for example, making the compiler infer it from an existing variable like decltype(my_map)::iterator)?

Aucun commentaire:

Enregistrer un commentaire