Boost logo

Boost :

From: Powell, Gary (powellg_at_[hidden])
Date: 2003-08-25 13:33:45


You have to use lambda::bind with lambda, they aren't quite interchangable yet.

  -Gary-

-----Original Message-----
From: Craigp [mailto:craigp_at_[hidden]]
Sent: Sunday, August 24, 2003 10:28 PM
To: boost_at_[hidden]
Subject: [boost] bind + lambda example fails on msvc2003

I tried the following example (taken from
http://boost.org/libs/lambda/doc/ar01s05.html#sect:construction_and_destruction) ,
and it failed to compile:

  std::vector<int> x(10);
  std::vector<int> y(10);
  std::vector<std::pair<int, int> > pairs;
  std::transform(x.begin(), x.end(), y.begin(), std::back_inserter(pairs),
    boost::bind(boost::lambda::constructor<std::pair<int, int> >(), _1,
_2));


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk