Boost logo

Boost :

From: Gabriel Dos Reis (gdr_at_[hidden])
Date: 2004-03-08 08:04:04


"Thorsten Ottosen" <nesotto_at_[hidden]> writes:

| "Gabriel Dos Reis" <gdr_at_[hidden]> wrote in message
| news:m365dgdlm3.fsf_at_uniton.integrable-solutions.net...
|
| > Yes, and that should be anticipated. People have already been storing
| > function objects (in the traditional C++ sense), there is no reason to
| > believe they would not attempt the same thing with lambdas.
|
| Consider
|
| struct X
| {
| auto x;
| };
|
| how can we know the size of X?

That is not supposed to be valid C++, regardless of lambdas, so I don't
quite understand your question.

However, you cn have this:

    template<class T>
    struct foo_helper {
       T data;
    };

    template<class T>
     foo_helper<T> foo(const T& x) { .... }

    auto x = foo(...);

-- Gaby


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk