Boost logo

Boost :

Subject: Re: [boost] [type traits extension] test for const volatile& as return type
From: Adam Merz (adammerz_at_[hidden])
Date: 2011-07-07 21:18:52

Jeffrey Lee Hellrung, Jr. <jeffrey.hellrung <at>> 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

Boost list run by bdawes at, gregod at, cpdaniel at, john at