Boost logo

Boost Users :

From: Jaakko Jarvi (jajarvi_at_[hidden])
Date: 2003-11-21 14:53:18


On Fri, 21 Nov 2003, Peter Dimov wrote:

> Hi,
>
> Jaakko Jarvi wrote:
> >> The second alternative doesn't work since Lambda doesn't support *_1
> >> for shared_ptr.
> >
> > In particular, Lambda's return type deduction templates are not aware
> > of shared_ptr.
>
> They do not need to be aware of shared_ptr. shared_ptr provides
> ::element_type, for consistency with std::auto_ptr. boost::shared_ptr also
> has ::reference, although tr1::shared_ptr might not. You just need to look
> for the individual typedef and not instantiate iterator_traits prematurely.

Ok, thanks. In any case, lambda's return type deduction rules do
not cover the convention of ::element_type.

  Jaakko


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