Title
confusing declarations of promise::set_value
Status
resolved
Section
[futures.promise]
Submitter
Jonathan Wakely

Created on 2009-11-22.00:00:00 last changed 171 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Change the synopsis in [futures.promise]:

// setting the result
void set_value(const R& r);
void set_value(see below);

And the definition be changed by qualifying the first signature:

void promise::set_value(const R& r);
void promise::set_value(R&& r);
void promise<R&>::set_value(R& r);
void promise<void>::set_value();
Date: 2010-10-21.18:28:33

Rationale:

Solved by N3058.

Date: 2010-12-05.00:09:22

[ 2010 Pittsburgh: Moved to NAD EditorialResolved. Rationale added below. ]

Date: 2009-11-22.00:00:00

The definitions of promise::set_value need tidying up, the synopsis says:

// setting the result
void set_value(const R& r);
void set_value(see below);

Why is the first one there? It implies it is always present for all specialisations of promise, which is not true.

The definition says:

void set_value(const R& r);
void promise::set_value(R&& r);
void promise<R&>::set_value(R& r);
void promise<void>::set_value();

The lack of qualification on the first one again implies it's present for all specialisations, again not true.

History
Date User Action Args
2010-12-05 00:09:22adminsetstatus: nad editorial -> resolved
2010-10-21 18:28:33adminsetmessages: + msg1393
2010-10-21 18:28:33adminsetmessages: + msg1392
2010-10-21 18:28:33adminsetmessages: + msg1391
2009-11-22 00:00:00admincreate