From: Stephan T. Lavavej [MSFT] on 12 Apr 2010 15:32 Given template <typename T> whatever foo(T&& t), t is a perfect forwarding parameter and will bind to anything, both lvalues and rvalues, in both rrv1 and rrv2. Given anything else, such as whatever bar(X&& x) or template <typename A> whatever baz(vector<A>&& v), x and v are not perfect forwarding parameters. In rrv2, they can't bind to lvalues. STL "Bronek Kozicki" <brok(a)spamcop.net> wrote in message news:ehTqerw1KHA.3648(a)TK2MSFTNGP05.phx.gbl... > On 05/04/2010 22:13, Stephan T. Lavavej [MSFT] wrote: >> Note that the VC10 CTP (which was pre-Beta 1) supported "rvalue >> references v1" like GCC 4.3 and 4.4 did, while VC10 RTM supports "rvalue >> references v2" like GCC 4.5 does. > > do you mean that "T&&" parameter no longer binds to lvalue in VC10? > >> The move semantics and perfect >> forwarding patterns are unaffected, but my description of how rvalue >> references bind to things is now outdated. > > > B. >
First
|
Prev
|
Pages: 1 2 Prev: Mailing follow-ups (was: Re: VC++ 6.0 vs VC++ 8.0) Next: Legacy Code update problems. |