$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2008-01-29 17:03:15
Steven Watanabe wrote:
> AMDG
> 
> Joseph Fradley wrote:
>> Steven,
>>
>> Thank you, I'm trying it now. But I'm a confused as to what type of
>> map to create from your line :
>>    map_.insert(std::make_pair("corner", &boost::bind(&Rectangle::corner, _1)));
>>
>> I've just now read up on boost::bind and I can only see documentation
>> of binding to member functions not member data. Could you elaborate?
>>
>> Joe
> 
> boost::function<Point&(Rectangle*)> f = boost::bind(&Rectangle::corner, _1);
> 
> Rectangle rect;
> 
> Point p = f(&rect); // equivalent to p = f.corner;
I think you meant: // equivalent to rect.corner
Jeff Flinn