
10 Mar
2004
10 Mar
'04
7:10 p.m.
I was just trying out lambda and I have a question. I have a template class Ave template<typename in_t, typename Scale> struct Ave {...} It takes a function type argument "Scale". Here's a test: typedef typeof (_1 * 0.1) some_type; some_type func (_1 * 0.1); // Ave<double, typeof (_1 * 0.1)> ave (_1 * 0.1); << this will work Ave<double, some_type> ave (func); << this will also What is the preferred way to do this without "typeof"? How do I get the type returned by the lambda expression to feed to the template Ave?