Boost logo

Boost :

Subject: Re: [boost] [xint] Unary operator+
From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2010-05-08 21:27:39


On 8 May 2010 20:55, Chad Nelson <chad.thecomfychair_at_[hidden]> wrote:
>
> I suspected that would be the reason for it. I couldn't think of
> anything else it would be useful for.
>

I've also seen it used to induce integral promotion, and thus affect
overload selection. For example:

    uint8_t x = 32;
    std::cout << x << +x << "\n";


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