Boost logo

Boost :

Subject: Re: [boost] [type traits extension] test for const volatile& as return type
From: Frédéric Bron (frederic.bron_at_[hidden])
Date: 2011-07-06 00:49:39


> This is what I get with g++ 4.6.0 for different values of T:
> - int&: g(...)
> - const int&: g(T)
> - volatile int&: g(...)
> - const volatile int&: g(...)
>
> This is what I get with intel 11.1:
> - int&: g(...)
> - const int&: g(T)
> - volatile int&: g(...)
> - const volatile int&: error: initial value of reference to const
> volatile must be an lvalue

And here is what msvc 10 does:
- int&: g(...)
- const int&: g(T)
- volatile int&: g(...)
- const volatile int&: g(...)
so the same as g++ (no compilation error).

Frédéric


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