
7 Jan
2011
7 Jan
'11
10:24 p.m.
Felipe Magno de Almeida wrote: ...
int main() { int i = 0; boost::bind(::foo(), boost::ref(i))(); }
I would expect the T type to be boost::reference_wrapper<int>, but it is actually int. It is not int& as well.
How do I get to propagate the boost::reference_wrapper through boost.bind to a template?
You can't, bind unwraps the reference_wrapper internally. Use either std::ref or your own reference wrapper.