Created on 2020-06-28.00:00:00 last changed 50 months ago
Proposed resolution:
Resolved by 3466
[ 2020-11-09 Resolved by acceptance of 3466. Status changed: Tentatively Resolved → Resolved. ]
[ 2020-08-02; Daniel comments ]
I'm request to reopen the issue and to follow the recent wording update of LWG 3466 instead.
[ 2020-07-17; Reflector prioritization ]
Set priority to 0 and status to Tentatively Ready after six votes in favour during reflector discussions.
Previous resolution [SUPERSEDED]:
This wording is relative to N4861.
Ideally the wording below would use a Mandates: element, but due to the still open issue LWG 3193 the wording below uses instead the more general "ill-formed" vocabulary.
Modify [futures.unique.future] as indicated:
namespace std { template<class R> class future { […] }; }-?- If is_array_v<R> is true or is_function_v<R> is true, the program is ill-formed.
-4- The implementation provides the template future and two specializations, future<R&> and future<void>. These differ only in the return type and return value of the member function get, as set out in its description, below.Modify [futures.shared.future] as indicated:
namespace std { template<class R> class shared_future { […] }; }-?- If is_array_v<R> is true or is_function_v<R> is true, the program is ill-formed.
-4- The implementation provides the template shared_future and two specializations, shared_future<R&> and shared_future<void>. These differ only in the return type and return value of the member function get, as set out in its description, below.
Currently there is no prohibition of creating shared_future<T>
where T
is
either an array type or a function type. However such objects cannot be constructed, as the corresponding
future<T>
, is ill-formed due the signature get()
method being ill-formed —
it will be declared as function returning an array or function type, respectively. [Note: For
shared_future
get always returns an reference, so it is well-formed for array or function
types.]
History | |||
---|---|---|---|
Date | User | Action | Args |
2020-11-09 22:09:52 | admin | set | messages: + msg11593 |
2020-08-21 20:18:09 | admin | set | status: open -> resolved |
2020-08-02 16:31:12 | admin | set | messages: + msg11423 |
2020-08-02 16:31:12 | admin | set | status: ready -> open |
2020-07-17 22:37:26 | admin | set | messages: + msg11376 |
2020-07-17 22:37:26 | admin | set | status: new -> ready |
2020-06-28 12:53:26 | admin | set | messages: + msg11353 |
2020-06-28 00:00:00 | admin | create |