Indicates that dependency chain in release-consume std::memory_order
propagates in and out of the function, which allows the compiler to skip unnecessary memory fence instructions.
[[carries_dependency]] |
Indicates that dependency chain in release-consume std::memory_order
propagates in and out of the function, which allows the compiler to skip unnecessary memory fence instructions.
This attribute may appear in two situations:
This attribute must appear on the first declaration of a function or one of its parameters in any translation unit. If it is not used on the first declaration of a function or one of its parameters in another translation unit, the program is ill-formed; no diagnostic required.
See std::kill_dependency
for example usage.
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/language/attributes/carries_dependency