Konstantin,,
Yes, this is possible. Please see the accumulator example for how to do this: 
https://github.com/STEllAR-GROUP/hpx/blob/master/examples/accumulator/accumulators/server/template_function_accumulator.hpp

Regards Hartmut
---------------
http://boost-spirit.com
http://stellar.cct.lsu.edu

> -----Original Message-----
> From: [email protected] [mailto:hpx-users-
> [email protected]] On Behalf Of Konstantin Kronfeldner
> Sent: Thursday, June 11, 2015 9:43 AM
> To: [email protected]
> Subject: Re: [hpx-users] Templated functions in components
> 
> Code was not yet finished:
> 
> struct MyComponent :
>     public hpx::components::managed_component_base<MyComponent>
> {
>     MyComponent() : ...
>     void my_function(const templated_argument<A> &arg) { ... }
>     HPX_DEFINE_COMPONENT_ACTION(MyComponent, my_function);
> 
>     // OR
>     template<typename T>
>     void my_templated_function(const templated_argument<T> &arg) { ... }
>     HPX_DEFINE_COMPONENT_ACTION(MyComponent, my_templated_function);
> 
> };
> 
> 
> 2015-06-11 16:40 GMT+02:00 Konstantin Kronfeldner
> <[email protected]>:
> Hello,
> 
> Can components have templated functions that can be called remotely? Or is
> that impossible?
> Or do you know another way to call a component function with templated
> arguments? Like so:
> 
> struct MyComponent :
>     public hpx::components::managed_component_base<MyComponent>
> {
>     MyComponent() : ...
>     void my_function(const templated_argument<A> &arg) { ... }
>     HPX_DEFINE_COMPONENT_ACTION(MyComponent, my_function);
> void my_function(const templated_argument<A> &arg) { ... }
>     HPX_DEFINE_COMPONENT_ACTION(MyComponent, my_function);
> 
> };
> 
> Regards,
> Konstantin


_______________________________________________
hpx-users mailing list
[email protected]
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users

Reply via email to