
8 Jul
2011
8 Jul
'11
1:18 a.m.
Jeffrey Lee Hellrung, Jr. <jeffrey.hellrung <at> gmail.com> writes:
<snip> By this logic,
void f(int&); void f(...) f(i++)
should also fail to compile, no?
I would think that the failure of an int rvalue to initialize either an int& or an int const volatile & would simply drop that overload from consideration.
I was so focused on whether it would be legal to call `void g(int const volatile&)` with an int rvalue that I completely forgot about the ellipsis overload. :-P I agree with you completely -- in this context `void g(T)` should be discarded during overload resolution and `void g(...)` should be called. Forgive my oversight -- this is definitely a bug in the Intel compiler.