Subject: Re: [boost] boost::bind result type
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-07-20 20:16:29
Daniel Walker wrote:
> Actually, I just looked into it, and this wasn't as hard as I thought.
> So, I can be a little more specific about the needed changes. As a
> proof of concept, I have attached a patch that allows the following
> where the bind object is stored directly by boost::function without
> type erasure.
> #include <functional>
> #include <boost/function.hpp>
> #include <boost/bind.hpp>
> int main()
> using namespace boost;
> > f = bind(std::plus<int>(), _1, 1);
If you're going to specify all the parameters of the
bind expression in the type of the boost::function, you'd
be better off just having a metafunction for deducing the
return type of bind.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk