From: Meryl Silverburgh (silverburgh.meryl_at_[hidden])
Date: 2006-02-14 15:07:11


How can I use boost:bind library to bind to constructor of a class.

Right now, I have code like this:
class build
{
public:

  Rect* operator()(string& str)
  {
    return new Rect(str);
  }

};

void TestBlockData::buildRectList( vector<string>& inputs, RectList& bdl) {
        
transform(inputs.begin(), inputs.end(), bdl.begin(), build());
}

I wonder if I can get rid of the whole "build class" by using
boost::bind library.

Thank you.