简体   繁体   中英

Portable standard-syntax atomic operations library in C++

I know that C++11 provides <atomic> , but this isn't implemented by any compiler except GCC 4.7. Is anyone aware of a library that follows the standard (ie, would be interchangeable with <atomic> once it becomes more widely available) and works on older versions of gcc/msvc?

The Boost.Atomic library and Just Thread .

Threading Building Blocks also supplies atomics, but they are not totally standard conformant.

It's not free, but I believe that just::thread would qualify. It's primarily a threading library, but I believe it includes most of the <atomic> header.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM