Skip to Content
C++ Reactive Programming
book

C++ Reactive Programming

by Praseed Pai, Peter Abraham
June 2018
Intermediate to advanced
348 pages
8h 45m
English
Packt Publishing
Content preview from C++ Reactive Programming

Standard atomic integral types

Similar to std::atomic<bool>, standard atomic integral types can be neither copy-constructible nor copy-assignable. However, they can be constructed and assigned from the corresponding non-atomic standard variant. Apart from the mandatory is_lock_free() member function, the standard atomic integral types, such as std::atomic<int> or std::atomic<unsigned long long>, also have load(), store(), exchange(), compare_exchange_weak(), and compare_exchange_strong() member functions, with similar semantics to those of std::atomic<bool>.

The integral variants of atomic types do support mathematical operations such as fetch_add(), fetch_sub(), fetch_and(), fetch_or() and fetch_xor(), compound-assignment operators (+=

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Functional Programming in C++

Functional Programming in C++

Ivan Cukic

Publisher Resources

ISBN: 9781788629775Supplemental Content