Afficher un message
Vieux 16/01/2008, 07h58   #5
LBCninja@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Initialize a std::set with keys from a std::map

> Why? Is there a reason you can't just leave the data in the map, and
> temporarily ignore the associated data?


I was just thinking about that. I know the set is used in a
std::set_union algorithm downstream, so I'll have to figure if that
algorithm works with maps (and hash_maps) tomorrow. I checked the
set_union docs on sgi.com, but it's cryptic enough that I can't really
tell.

Daniel, your suggestion looks neat. If I can't avoid making the set
altogether I'll give that a try.
  Réponse avec citation
 
Page generated in 0,04352 seconds with 9 queries