|
Boost : |
Subject: Re: [boost] [type traits] issue with operator traits and volatile qualifier
From: Nevin Liber (nevin_at_[hidden])
Date: 2011-05-25 11:29:06
2011/5/25 Frédéric Bron <frederic.bron_at_[hidden]>
>
> Could someone tell me why the following code does not compile?
>
> bool f() { }
> void g(const volatile bool &) { }
>
> int main() {
> g(f());
> return 0;
> }
>
I think it falls out of temporaries cannot bind to non-const references, and
a const volatile reference is not considered to be a const reference.
-- 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