From: Douglas Paul Gregor (gregod_at_[hidden])
Date: 2004-06-05 09:50:10
On Fri, 4 Jun 2004, Jonathan Graehl wrote:
> If I pass a boost::ref to a template function that calls operator() with
> one argument, the conversion to T& isn't used to find matching
> functions. The problem seems to also exist for other overloaded operators.
boost::ref is supposed to do this, but nobody has gotten around to
finishing it yet. I hope to get there for the next Boost release (whenever
that will be).
> What should I do in this case? I thought the idea was for the ref to be
> transparent to the template code you pass it to.
You can use, e.g., bind(ref(f), _1, _2) for now.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk