jeudi 11 mars 2021

What is the c-style atomic free function like std::atomic_is_lock_free for?

I understand that std::atomic_is_lock_free is c-style free function corresponding to std::atomic::is_lock_free.

But the parameter of this function is like std::atomic_is_lock_free(const std::atomic<T>*). The std::atomic<T> is not c-style syntax so std::atomic_is_lock_free can't be used in c file anyway.

So why is this c-style free function introduced? What is the usage of this?

Aucun commentaire:

Enregistrer un commentaire