boost::lambda and math functions

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

2009/11/24 Peter Foelsche
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.
#include <cmath>
#include
participants (2)
-
Peter Foelsche
-
Roman Perepelitsa