S SearchRSS
< BackHome
Newest questions tagged c++ - Stack Overflow

Is usage of std::atomic with type std::optional<int> thread safe?

In the below code, I have an atomic error state variable inside a library with some auxiliary functions to get, set and clear the error state. I want to know is the library written code thread safe? #include #include #

View original source