
5 Jun
2004
5 Jun
'04
2:50 p.m.
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. Doug