
9 Oct
2008
9 Oct
'08
11:17 p.m.
or even more clear: #include <map> #include <set> typedef std::map<size_t, size_t> CInt2IntMap; typedef std::set<size_t> CIntSet; static CInt2IntMap convert(const CIntSet &_r) { CInt2IntMap s; for (CIntSet::const_iterator p = _r.begin(); p != _r.end(); ++p) s.insert(std::make_pair(*p, s.size())); return s; }