$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] Help with a boost::lambda problem	and	boost::array?
From: Max (loadcom_at_[hidden])
Date: 2009-01-22 20:51:52
> >
> > I've tested with this, but didn't work, neither.
> >
> > typedef boost::array<double, 2> array_t; boost::function<double (const
> > array_t&)> f
> > 	= lambda::bind(std::multiplies<double>(),
> > 		lambda::bind(&array_t::operator[] const, lambda::_1, 0),
> > 		lambda::bind(&array_t::operator[] const, lambda::_1, 1));
> >
> > why?
> >
> 
> Because this:
> 
> &array_t::operator[] const
> 
> is not legal syntax.
> 
> In Christ,
> Steven Watanabe
> 
Thanks.
Then how about
typedef boost::array<double, 2> array_t; boost::function<double (const
array_t&)> f
        = lambda::bind(std::multiplies<double>(),
                lambda::bind(&array_t::operator[], lambda::_1, 0),
                lambda::bind(&array_t::operator[], lambda::_1, 1));
?