AMDGcreates a function object that executes
boost::bind( wrapper, a, boost::bind( c, p ), b );
wrapper(a, c(p), b).
what you want is
wrapper(a, boost::bind( c, p ), b),
so you have to write
boost::bind( wrapper, a, boost::protect(boost::bind( c, p )), b );
In Christ,