Boost logo

Boost Users :

Subject: Re: [Boost-users] Process extension compile issue.
From: Klaim - Joël Lamotte (mjklaim_at_[hidden])
Date: 2017-06-15 10:10:41


On 15 June 2017 at 10:55, dinesh kumar via Boost-users <
boost-users_at_[hidden]> 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 <dineshkumar02_at_[hidden]>
> wrote:
>
>> Hi Team,
>>
>> Greetings for the day.
>>
>> I am currently facing the problem with process extension as documented
>> here
>> <http://www.boost.org/doc/libs/1_64_0/doc/html/boost_process/design.html#boost_process.design.plat_ext>
>> .
>> 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.

[1]:
http://www.boost.org/doc/libs/1_64_0/doc/html/boost/process/extend/on_setup.html

Joël Lamotte



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net