Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-05-11 15:59:31


"Peter Dimov" <pdimov_at_[hidden]> wrote in message
news:004101c5566a$6aaecd50$6401a8c0_at_pdimov2...
| Thorsten Ottosen wrote:
|
| > I don't know why you insists that we need two overloads.
| >
| > Given
| >
| > template< class T >
| > MyType
| > {
| > Iter Begin();
| > ConstIter Begin() const;
| > ...
| > };
| >
| > surely
| >
| > template< class T >
| > auto begin( MyType<T>&& r ) -> decltype( r.Begin() )
| > { return r.Begin(); }
| >
| > can handle both const and non-const arguments.
|
| No, it can't.

do you care to explain why...I thought this was how we were supposed to
solve the forwarding problem.

Thanks

-Thorsten


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