This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++14 status.
std::launch
an implementation-defined type?Section: 32.10.1 [futures.overview] Status: C++14 Submitter: Jonathan Wakely Opened: 2011-11-20 Last modified: 2016-01-28
Priority: Not Prioritized
View all other issues in [futures.overview].
View all issues with C++14 status.
Discussion:
32.10.1 [futures.overview] says std::launch
is an
implementation-defined bitmask type, which would usually mean the
implementation can choose whether to define an enumeration type, or a
bitset
, or an integer type. But in the case of std::launch
it's
required to be a scoped enumeration type,
enum class launch : unspecified { async = unspecified, deferred = unspecified, implementation-defined };
so what is implementation-defined about it, and what is an implementation supposed to document about its choice?
[2011-12-02 Moved to Tentatively Ready after 6 positive votes on c++std-lib.]
Proposed resolution:
This wording is relative to the FDIS.
Change 32.10.1 [futures.overview] paragraph 2 as indicated:
The enum type
launch
isan implementation-defineda bitmask type (16.3.3.3.3 [bitmask.types]) withlaunch::async
andlaunch::deferred
denoting individual bits. [ Note: Implementations can provide bitmasks to specify restrictions on task interaction by functions launched byasync()
applicable to a corresponding subset of available launch policies. Implementations can extend the behavior of the first overload ofasync()
by adding their extensions to the launch policy under the “as if” rule. — end note ]