Before C++ 20, the default constructor of std::atomic does not initialize the underlying object (see https://en.cppreference.com/w/cpp/atomic/atomic/atomic). This can lead to situations where load() returns an uninitialized object, thus resulting in undefined behavior.
Before C++ 20, the default constructor of
std::atomic
does not initialize the underlying object (see https://en.cppreference.com/w/cpp/atomic/atomic/atomic). This can lead to situations whereload()
returns an uninitialized object, thus resulting in undefined behavior.This PR fixes #16.