Boost logo

Boost :

Subject: Re: [boost] [type traits] issue with operator traits and volatile qualifier
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-05-25 11:28:11


On 05/25/2011 08:15 AM, Frédéric Bron wrote:
> Sorry for being absent during the last month but it was very hard to
> find any time to work on the addition of the operator traits.
> I have not yet had the time to deal with the naming issue...
> But I found something more tricky while trying to solve the issue of
> reference types (& was just ignored).
> I never used the volatile qualifier but I found that the following
> behaviour breaks the code that detects if an operator returns void or
> not.
> Could someone tell me why the following code does not compile?
> bool f() { }
> void g(const volatile bool &) { }
> int main() {
> g(f());
> return 0;
> }

A const volatile reference can't be bound to
an rvalue.

In Christ,
Steven Watanabe

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