Liste des Groupes | Revenir à cl c++ |
On 15.09.2024 23:15, Chris M. Thomasson wrote:Yes, no implementation of atomic<shared_ptr<>> of MSVC, libstdc++ andOn 9/15/2024 11:54 AM, Paavo Helde wrote:I already checked this, it is returning false at least on one of my target platforms (Visual Studio 2022, Windows x86_64). IIRC Bonita claimed this might be a false negative though.
[...]So, what do you think? Should I just use std::atomic<std::shared_ptr> instead? Any other suggestions? Did I get the memory order parameters right in compare_exchange_weak()?>
Keep in mind that you need to make sure that std::atomic<std::shared_ptr> is actually lock-free...
>
Make sure to investigate is_always_lock_free on your various arch's:
>
https://en.cppreference.com/w/cpp/atomic/atomic/is_always_lock_free
Les messages affichés proviennent d'usenet.