Movatterモバイル変換


[0]ホーム

URL:



This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofC++14 status.

2120. What shouldasync do if neither 'async' nor 'deferred' is set in policy?

Section: 32.10.9[futures.async]Status:C++14Submitter: Jonathan WakelyOpened: 2012-01-01Last modified: 2016-01-28

Priority:Not Prioritized

View otheractive issues in [futures.async].

View all otherissues in [futures.async].

View all issues withC++14 status.

Discussion:

Implementations already disagree, one returns an invalid future withno shared state, one choosespolicy == async and one choosespolicy ==deferred, see c++std-lib-30839, c++std-lib-30840 and c++std-lib-30844.It's not clear if returning an invalid future is allowed by the current wording.

If the intention is to allow an empty future to be returned, then32.10.9[futures.async] p3 and p4 should be adjusted to clarify that ashared state might not be created and an invalid future might be returned.

If the intention is that a valid future is always returned, p3 shouldsay something about the case where none of the conditions applies.

[2012, Portland: move to Review]

We could make it undefined if no launch policy is defined.

Hans: If no launch policy is specified the behaviour is undefined

Artur: or implementation defined?

Hans: no: we don't want people to do this

[Proposed wording]

This wording is relative to N3376

Add a third bullet to the end of the list in 30.6.8p3

"if no valid launch policy is provided the behaviour is undefined"

Moved to review

[2013-04-19, Bristol]

Detlef provides new wording

Previous wording:

[This wording is relative to N3376]

Add a third bullet to the end of the list in 32.10.9[futures.async]p3

– if no valid launch policy is provided the behaviour is undefined

[2013-09 Chicago]

If no policy is given, it should be undefined, so moved to Immediate.

Accept for Working Paper

Proposed resolution:

[This wording is relative to N3485]

Add a third bullet to the end of the list in 32.10.9[futures.async]p3

– If no value is set in the launch policy, or a value is set that isneither specified in this International Standard or by the implementation, the behaviour is undefined.

[8]ページ先頭

©2009-2026 Movatter.jp