From: Torsten Maehne (Torsten.Maehne_at_[hidden])
Date: 2008-06-16 11:00:11
Hello Steven and Matthias,
Steven Watanabe wrote:
> Yes. The correct solution is to add overloads for the operators, rather
> than specializations
> of plain_return_type_2.
> template<typename System, typename Dim, typename T>
> ... operator*(const boost::lambda::lambda_functor<T>&, const
> boost::units::unit<Dim, System>&);
> You'll have to peek at the internals of lambda to figure out what the
> return type should be.
I finally got around to add the required disambiguation overloads for
operator* and operator/ involving boost::units::quantity and
boost::units::absolute. All checks in test_lambda.cpp compile and
execute now as expected. You can find both files in the attachment.
lambda.hpp works also well together with my library of functor wrappers
for the cmath functions, which I'm currently working on. However, the
latter is still missing some functions from cmath.hpp that's why I
haven't included it in this posting.
Thus all issues with lambda.hpp known to me are resolved. (Steven
suggested to tackle the bind issue of overloaded functions separately.)
Do you think this makes the files lambda.hpp, test_lambda.hpp, and
lambda.cpp mature enough to become official part of Boost.Units? I'm
looking forward to your feedback!
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk