Boost logo

Boost Users :

Subject: Re: [Boost-users] mpl programming task
From: peter_foelsche_at_[hidden]
Date: 2008-10-09 19:17:30


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;
}


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net