1107. constructor shared_future(unique_future) by value?

Section: 33.6.8 [futures.shared_future] Status: NAD Editorial Submitter: Thomas J. Gritzan Opened: 2009-04-03 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [futures.shared_future].

View all issues with NAD Editorial status.

Discussion:

In the shared_future class definition in 33.6.8 [futures.shared_future] the move constructor that constructs a shared_future from an unique_future receives the parameter by value. In paragraph 3, the same constructor receives it as const value.

I think that is a mistake and the constructor should take a r-value reference:

shared_future(unique_future<R>&& rhs);

[ Batavia (2009-05): ]

We agree with the proposed resolution.

Move to Tentatively Ready.

[ 2009-07-05 Daniel notes: ]

The proposed change has already been incorported into the current working draft N2914.

Proposed resolution:

Change the synopsis in 33.6.8 [futures.shared_future]:

shared_future(unique_future<R>&& rhs);

Change the definition of the constructor in 33.6.8 [futures.shared_future]:

shared_future(const unique_future<R>&& rhs);