This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 119c. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2026-03-07


1842. Unevaluated operands and “carries a dependency”

Section: 6.10.2  [intro.multithread]     Status: CD7     Submitter: Hans Boehm     Date: 2014-01-23     Liaison: SG1

[ Resolved by paper P3475R2 (Defang and deprecate memory_order::consume), adopted in February, 2025. ]

According to 6.10.2 [intro.multithread] paragraph 9,

An evaluation A carries a dependency to an evaluation B if

The intent is that this does not apply to the second operands of such operators if the first operand is such that they are not evaluated, but the wording is not clear to that effect. (A similar question applies to the non-selected operand of the conditional operator ?:.)

Notes from the October, 2015 meeting:

It appears likely that the text involved will be removed by a revision to the memory_order_consume specification.

Notes from the February, 2016 meeting:

Action on this issue will be deferred until the specification for memory_order_consume is complete; it should not currently be used.