Hello, I cannot seem to figure out how to make a composite unit out of two existing units from the same system. For example, say I have a functor F which takes an argument of type F::arg_type = quantity<time> and returns a value of type F::ret_type = quantity<velocity> Now I want to write an integration function, which should return the correct type, something like template<class F> F::ret_type*F::arg_type // only conceptually integrate(F& f, typename F::arg_type a, typename F::arg_type b); so instantiating this with the above functor should produce a return type quantity
Hello,
I cannot seem to figure out how to make a composite unit out of two existing units from the same system. For example, say I have a functor F which takes an argument of type
F::arg_type = quantity<time>
and returns a value of type
F::ret_type = quantity<velocity>
Now I want to write an integration function, which should return the correct type, something like
template<class F> F::ret_type*F::arg_type // only conceptually integrate(F& f, typename F::arg_type a, typename F::arg_type b);
so instantiating this with the above functor should produce a return type quantity
#include
Sorry, I should have actually checked my response... This one works :
#include
On Fri, 11 Sep 2009 12:05:33 -0600
Matthias Schabel
Sorry, I should have actually checked my response... This one works :
Thank you very much, this is exactly what I was looking for.
Bye,
Rupert
--
Rupert Mazzucco
participants (2)
-
Matthias Schabel
-
Rupert Mazzucco