
6 Jul
2011
6 Jul
'11
4:49 a.m.
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