This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++11 status.
Section: 126.96.36.199 [thread.once.callonce] Status: C++11 Submitter: INCITS Opened: 2010-08-25 Last modified: 2016-02-10
Priority: Not Prioritized
View all other issues in [thread.once.callonce].
View all issues with C++11 status.
The term "are serialized" is never defined (188.8.131.52 [thread.once.callonce] p. 2).
[ Resolution proposed by ballot comment: ]
Remove the sentence with "are serialized" from paragraph 2. Add "Calls to call_once on the same once_flag object shall not introduce data races (184.108.40.206)." to paragraph 3.
[ 2010-11-01 Daniel translates NB comment into wording ]
[ 2011-02-17: Hans proposes an alternative resolution ]
[ 2011-02-25: Hans, Clark, and Lawrence update the suggested wording ]
[2011-02-26 Reflector discussion]
Moved to Tentatively Ready after 5 votes.
Change 220.127.116.11 [thread.once.callonce] p.2+3 as indicated:
template<class Callable, class ...Args> void call_once(once_flag& flag, Callable&& func, Args&&... args);
Calls to call_once on the same once_flag object are serialized. If there has been a prior effective call to call_once on the same once_flag object, the call to call_once returns without invoking func. If there has been no prior effective call to call_once on the same once_flag object, INVOKE(decay_copy( std::forward<Callable>(func)), decay_copy(std::forward<Args>(args))...) is executed. The call to call_once is effective if and only if INVOKE(decay_copy( std::forward<Callable>(func)), decay_copy(std::forward<Args>(args))...) returns without throwing an exception. If an exception is thrown it is propagated to the caller.3 Synchronization: The completion of an effective call to call_once on a once_flag object synchronizes with (6.9.2 [intro.multithread]) all subsequent calls to call_once on the same once_flag object.