
25 May
2011
25 May
'11
3:29 p.m.
2011/5/25 Frédéric Bron <frederic.bron@m4x.org>
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@eviloverlord.com> (847) 691-1404