Boost logo

Boost :

From: Pavol Droba (droba_at_[hidden])
Date: 2003-10-23 15:39:20


On Thu, Oct 23, 2003 at 03:11:35PM -0400, David Abrahams wrote:
> Pavol Droba <droba_at_[hidden]> writes:
>
> >> I'm not sure a fix is needed. The first variant will already match
> >> const containers, as long as they're not temporaries.
> >>
> >>
> >> template <class T>
> >> int f(T& x);
> >>
> >> int const x;
> >> int y = f(x); // T deduced as const int.
> >>
> >
> > You are right, there is no restriction on const, rather ther is a restriction,
> > that the input must be valid R-value i.e. not a temporary.
>
> Temporaries *are* rvalues; I think you must mean lvalue.
>
Sure, you are right.

Pavol


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