I have no guess as to why it would be desirable for this function to have "C" rather than "C++" linkage.
That was added by LWG issue 1479 which was addressing a last-minute comment on C++11.
The rationale for this change was C language compatibility (C11 thread library has identically-named function atomic_thread_fence in stdatomic.h).
As far as I understand, it was always a plan that C and C++ atomic libraries can coexist: other examples of compatiblity are the C-compatible type aliases for std::atomic, such as atomic_int
and the C-compatibility macro ATOMIC_VAR_INIT
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With