Boost logo

Boost :

Subject: Re: [boost] tuple benchmarks show marked differences from std::tuple(was Re: Interesting article on stack-based TMP
From: Jeffrey Lee Hellrung, Jr. (jeffrey.hellrung_at_[hidden])
Date: 2012-10-25 22:24:11

On Thu, Oct 25, 2012 at 9:58 AM, Larry Evans <cppljevans_at_[hidden]>wrote:

> Also, it's not obvious to me why:
> static_cast<Tuple &&>(that)
> is needed because that has been declared as Tuple &&.

The expression "that" (without quotes) is an lvalue, regardless of the
declared type of the variable "that". Same reason that
boost::forward/std::forward exists. It's like that (har har) to prevent you
from unintentionally moving.

- Jeff

Boost list run by bdawes at, gregod at, cpdaniel at, john at