
Hi Peter Thanks for looking at this!
I must admit I don't currently see why this happens, I'll probably have to produce a minimal repro and ask bind experts for help.
It happens because ultimately you produce a bind expression such as
boost::bind( pImpl, this, ..., boost::ref( value ) )
and the ref is interpreted by bind as a reference to 'value'. But your Arg1 remains a reference_wrapper. You'll probably need to convert ArgN parameters that are of the form reference_wrapper<X> to X& before instantiating create_processor_implN.
Ok, lets see whether I understand this correctly: #include <boost/noncopyable.hpp> #include <boost/bind.hpp> class Object : public boost::noncopyable {}; void func1(Object &) {} void func2(boost::reference_wrapper<Object>) {} int main() { Object value; boost::bind(&func1, boost::ref(value))(); // 1: compiles boost::bind(&func2, boost::ref(value))(); // 2: doesn't return 0; } 2 doesn't compile because bind internally assumes that the target function accepts a T & parameter for each reference_wrapper<T> argument, correct? If so, then I guess I should use boost::unwrap_reference<Arg1>::type instead of Arg1 to instantiate create_processor_impl1. Thanks & Regards, -- Andreas Huber When replying by private email, please remove the words spam and trap from the address shown in the header.