Boost logo

Boost :

From: Neal D. Becker (ndbecker2_at_[hidden])
Date: 2004-03-10 14:10:43

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
returned by the lambda expression to feed to the template Ave?

Boost list run by bdawes at, gregod at, cpdaniel at, john at