$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] Boost lambda bind and boost smart_ptr issue
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-06-08 21:42:39
AMDG
Brian Martin wrote:
> class shape
> {
> public:
> virtual void draw(const int)=0;
> };
>
> <snip>
>
> vector< shared_ptr<shape> > shapes;
>
> // assume I stick stuff into shapes...
>
> for_each(shapes.begin(), shapes.end(), bind(&shape::draw, _1, 2));
>
> The last statement fails under VC++ 2008 with
> error C2665: 'boost::lambda::function_adaptor<Func>::apply' : none of the 2
> overloads could convert all the argument types
>
Dereferencing the pointer should work with the current trunk.
In Christ,
Steven Watanabe