$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Bruno Lalande (bruno.lalande_at_[hidden])
Date: 2008-02-05 04:17:00
>
> * The result type is not necessarily going to be the same as the arguments
> so it would need to use Boost.Typeof or some such.
Yep, I had already thought about this improvement.
>
> * Rational exponents need to work, so I would need a way to specialize
> the function to work with boost::units::static_rational. I would expect
> the customization mechanism to look something like this:
>
> struct default_value_tag;
>
> template<class T>
> struct pow_value_tag {
> typedef default_value_tag tag;
> };
>
> template<class Exp>
> struct pow_exponent_tag {
> typedef typename Exp::tag type;
> };
>
> template<class ValueTag, class ExponentTag>
> struct pow_impl;
>
> template<class Value, class Exponent>
> struct pow {
> typedef typename pow_impl<
> typename pow_value_tag<Value>::type,
> typename pow_exponent_tag<Exponent>::type
> >::template apply<Value, Exponent> impl;
> typedef typename impl::type type;
> static type call(const Value& v) {
> return(impl::call(v));
> }
> };
>
OK I will consider this need and find a way to satisfy it.
I'm going to write a first version of tests and docs with the implementation
we have for now, and then I'll add those additional functionalities.
Thanks
Bruno