$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] using bind with operator new
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-05-19 17:52:56
AMDG
Archie14 wrote:
> I am trying to use bind to generate ptr_vector list of objects from another
> vector
>
> #include <boost/shared_ptr.hpp>
> #include <boost/bind.hpp>
>
>
>
> boost::bind((&listofb::push_back), lstb,
> boost::bind((&operator new), b, _1)
> );
>
You'll most likely do better using Boost.Lambda.
boost::lambda::bind(&listofb::push_back, lstb,
boost::lambda::bind(boost::lambda::new_ptr<b>(_1)))
In Christ,
Steven Watanabe