On Wed, Jun 14, 2017 at 1:35 AM, dinesh kumar <dineshkumar02@gmail.com> wrote:Hi Team,Greetings for the day.I am currently facing the problem with process extension as documented here.I am testing the boost 1.64 version macOS, and unable to use the below functionality.void test() {
cout << "On Setup" << endl;
}
int main() {
std::function<void(void)> on_st = test;
bp::child c2("ls", boost::process::extend::on_set
up(on_st)); }
Error:
/usr/local/include/boost/proce
ss/detail/handler.hpp:33:9: No matching function for call to object of type 'std::__1::function<void ()>' Would somebody guide me here, please?The documentation[1] states:"The required signature isvoid(Exec &)
, whereExec
is a template parameter".on_st's type do not match this requirement.
void test() {
cout << "On Setup" << endl;
}
int main() {
auto on_st = [](auto exec){ test(); };
bp::child c2("ls", on_set
}
Joël Lamotte