Boost logo

Boost Users :

Subject: Re: [Boost-users] [Boost.Thread] unique_future without && ?
From: Jeffrey Lee Hellrung, Jr. (jeffrey.hellrung_at_[hidden])
Date: 2012-04-09 12:29:50


On Mon, Apr 9, 2012 at 9:04 AM, John M. Dlugosz <mpbecey7gu_at_[hidden]>wrote:

> On 4/8/2012 10:25 AM, Jeffrey Lee Hellrung, Jr. wrote:
>
> Well the accessibility of a member function never influences its position
>> in an overload
>> set (AFAIK). What is *suppose* to happen in C++03 for the above example
>> is that the
>> future::future(rv< future >&) overload gets called, since a future rvalue
>> isn't suppose to
>> be bindable to the argument of the (private and undefined)
>> future::future(future&)
>> overload. That's clearly not happening :( I can't think of a fix other
>> than making your
>> intentions very explicit as you've done above :/
>>
>
> So, does anyone have any insight on the VS10 error? If it's a
> straightforward compiler bug (not allowing T&& and const T& to be
> overloaded sets) I think that would have been discovered and get in the way
> _everywhere_.
>

AFAIK the problem was that T is bound to a (lvalue) reference, causing T&&
== T const &. I'm confused, though, as the quoted comment above referred to
a problem with the Sun compiler, not the Visual Studio compiler...

- Jeff



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net