From: Michael Stevens (mail_at_[hidden])
Date: 2005-07-11 04:42:43
On Monday 11 July 2005 10:38, Andrew Rieck wrote:
> ublas-bounces_at_[hidden] wrote on 11/07/2005 04:46:20 PM:
> > Quoting Andrew Rieck <arieck_at_[hidden]>:
> > > This work is already done in the following (excluding the redundant
> > > functions):
> > >
> > > #include <limits>
> > > #include <boost/call_traits.hpp>
> > The boost call traits do not define the return types of
> > arithmetic operations (as far as I know). For example,
> > having "z = x+y",where "x:double","y:complex<double>",
> > you need to calculate the type of "z" somehow.
> > Here needed something like: plus_traits<S1,S2>.
uBLAS does not use the type_traits for return type deduction. It uses
'promote_traits' which does the deduction automatically via
type_deduction_detail::base_result_of<X, Y> for binary operations.
> Yes, that is correct. However, the following:
> #include <boost/utility/result_of.hpp>
> would do the job in a clean fashion.
Thanks for pointing out the result_of is now (for at least a year) in Boost.
'promote_traits' was the state of the art a couple of years back. We should
definitely change over to result_of in the future.
All the best,