std::kill_dependency (3) - Linux Manuals
std::kill_dependency: std::kill_dependency
NAME
std::kill_dependency - std::kill_dependency
Synopsis
Defined in header <atomic>
template< class T > (since C++11)
T kill_dependency( T y ) noexcept;
Informs the compiler that the dependency tree started by an std::memory_order_consume atomic load operation does not extend past the return value of std::kill_dependency; that is, the argument does not carry a dependency into the return value.
This may be used to avoid unnecessary std::memory_order_acquire fences when the dependency chain leaves function scope (and the function does not have the [[carries_dependency]] attribute)
Parameters
y - the expression whose return value is to be removed from a dependency tree
Return value
Returns y, no longer a part of a dependency tree.
Examples
See also
memory_order defines memory ordering constraints for the given atomic operation
(C++11)