Boost logo

Boost Users :

Subject: [Boost-users] boost::lambda and math functions
From: Peter Foelsche (peter_foelsche_at_[hidden])
Date: 2009-11-23 20:46:37


I've the following template function:

template<typename T>
T exp2(const T T0_d)
{ return exp(0.5*T0_d) + 2*exp(T0_d);
}

I want to define this as a lambda function in place (but don't know how).

It will be used with T=double and T=MyAutomaticDerivativeClass.
I've already defined the return type of arithmetic operators applied to
MyAutomaticDerivativeClass:

namespace boost {
namespace lambda {

template<class Act, typename X, typename Y>
struct plain_return_type_2<arithmetic_action<Act>, X, Y>
{ typedef ... type;
};

}
}

What else is missing?

Thanks
Peter

_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net