Hi Lukas, had to change hpx::future<hpx::id_type> where to hpx::id_type where but now it works.
Thank You! Best regards Tobias Gauweiler On 18 September 2017 at 16:47, Lukas <[email protected]> wrote: > Tobias, > > the constructor you are referencing is actually the move constructor, > therefore it is perfectly reasonable to only expecct it to take > hpx::future<hpx::id_type>&& as its argument. > > The solution to your problem is to do add a constructor similiar to > > some_component_client(hpx::future<hpx::id_type> where, size_t argument) > : base_type(hpx::new_<some_component>(where, argument)) > {} > > which you could use like this: > > auto client = some_component_client(hpx::find_here(), 3); > > 2017-09-18 16:35 GMT+02:00 Tobias Gauweiler <[email protected]>: > >> Hello, >> >> i am trying to write a client side representation class for a component >> with constructor arguments to pass to the component constructor. >> >> I did use as base the example in the documentation: https://stellar >> -group.github.io/hpx/docs/html/hpx/manual/components/ >> components_client.html >> which only uses the default constructor. >> >> And then tried adding a extra argument: >> >> some_component_client(hpx::future<hpx::id_type> && id, size_t argument) >> : base_type(std::move(id), argument) >> {} >> >> as constructor. >> >> And tried to create a instance with >> hpx::new_<some_component_client>(hpx::find_here(), >> 10); >> Which fails because client_base constructor only allows one argument. >> >> I had a look at the source of client_base and i am guessing that >> static Derived create(id_type const& targetgid, Ts&&... vs) >> could be the function i need to use, but i have no idea how. >> >> Any idea how i get this working? >> >> Best regards >> Tobias Gauweiler >> >> _______________________________________________ >> hpx-users mailing list >> [email protected] >> https://mail.cct.lsu.edu/mailman/listinfo/hpx-users >> >> > > _______________________________________________ > hpx-users mailing list > [email protected] > https://mail.cct.lsu.edu/mailman/listinfo/hpx-users > >
_______________________________________________ hpx-users mailing list [email protected] https://mail.cct.lsu.edu/mailman/listinfo/hpx-users
