Process extension compile issue.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Process extension compile issue.

Boost - Users mailing list
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_setup(on_st));

}

Error: 

/usr/local/include/boost/process/detail/handler.hpp:33:9: No matching function for call to object of type 'std::__1::function<void ()>'    


Would somebody guide me here, please?

--

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Process extension compile issue.

Boost - Users mailing list
Hi Team,

Would anyone share your suggestions about the following error?

Error: 

/usr/local/include/boost/process/detail/handler.hpp:33:9: No matching function for call to object of type 'std::__1::function<void ()>' 


On Wed, Jun 14, 2017 at 1:35 AM, dinesh kumar <[hidden email]> 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_setup(on_st));

}

Error: 

/usr/local/include/boost/process/detail/handler.hpp:33:9: No matching function for call to object of type 'std::__1::function<void ()>'    


Would somebody guide me here, please?

--



--

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Process extension compile issue.

Boost - Users mailing list


On 15 June 2017 at 10:55, dinesh kumar via Boost-users <[hidden email]> wrote:
Hi Team,

Would anyone share your suggestions about the following error?

Error: 

/usr/local/include/boost/process/detail/handler.hpp:33:9: No matching function for call to object of type 'std::__1::function<void ()>' 


On Wed, Jun 14, 2017 at 1:35 AM, dinesh kumar <[hidden email]> 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_setup(on_st));

}

Error: 

/usr/local/include/boost/process/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 is void(Exec &), where Exec is a template parameter".

on_st's type do not match this requirement.


Joël Lamotte



_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Process extension compile issue.

Boost - Users mailing list

On 15 June 2017 at 12:10, Klaim - Joël Lamotte <[hidden email]> wrote:


On Wed, Jun 14, 2017 at 1:35 AM, dinesh kumar <[hidden email]> 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_setup(on_st));

}

Error: 

/usr/local/include/boost/process/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 is void(Exec &), where Exec is a template parameter".

on_st's type do not match this requirement.


The following change should work (I didn't try but the documentation have a similar exemple there: 

void test() {

    cout << "On Setup" << endl;

}

int main() {

auto on_st = [](auto exec){ test(); };

bp::child c2("ls", on_setup(on_st));

}

Joël Lamotte



_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Process extension compile issue.

Boost - Users mailing list
Hi Joël Lamotte,

Thank you very much for pointing me in the right direction, and I still see that the documentation here needs better improvement and I will try to raise a request to improve the docs.


--Dinesh

On Thu, Jun 15, 2017 at 3:44 PM, Klaim - Joël Lamotte via Boost-users <[hidden email]> wrote:

On 15 June 2017 at 12:10, Klaim - Joël Lamotte <[hidden email]> wrote:


On Wed, Jun 14, 2017 at 1:35 AM, dinesh kumar <[hidden email]> 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_setup(on_st));

}

Error: 

/usr/local/include/boost/process/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 is void(Exec &), where Exec is a template parameter".

on_st's type do not match this requirement.


The following change should work (I didn't try but the documentation have a similar exemple there: 

void test() {

    cout << "On Setup" << endl;

}

int main() {

auto on_st = [](auto exec){ test(); };

bp::child c2("ls", on_setup(on_st));

}

Joël Lamotte



_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users



--

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Loading...