Boost logo

Boost Users :

Subject: [Boost-users] mpl programming task
From: peter_foelsche_at_[hidden]
Date: 2008-10-09 19:11:37

Anybody able to tell me how to convert the following code into it's mpl equivalent?

#include <map>
#include <vector>

typedef std::map<size_t, size_t> CInt2IntMap;
typedef std::vector<bool> CBooleanVector;

static CInt2IntMap convert(const CBooleanVector &_r)
{ CInt2IntMap s;
        for (size_t i = 0; i < _r.size(); i++)
                if (_r[i])
                        s.insert(std::make_pair(i, s.size()));
        return s;

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at