Boost logo

Boost :

Subject: Re: [boost] [Multiprecision] Does MP use references internally?
From: Nevin Liber (nevin_at_[hidden])
Date: 2013-06-21 12:35:44


On 21 June 2013 06:56, John Maddock <john_at_[hidden]> wrote:

> Nearly all operators, besides assigning and dereferencing ones, are
>> supposed to return by value.
>> Changing that, even with the “innocuous” (unary)+, is surprising.
>>
>
> This came up in review actually with no good solution - the main issue
> (apart from no one ever using unary + anyway)

I wouldn't quite say that...

My use case is:

unsigned char u = 100;
std::cout << +u << std::endl;

(since it is far shorter than all the alternatives).

-- 
 Nevin ":-)" Liber  <mailto:nevin_at_[hidden]>  (847) 691-1404

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