There has been a lot of debate going on concerning the usefulness of volatile
in multi-threaded code. Most people agree, that the principal usecases of volatile
are mostly for bare metal applications such as device drivers and interrupt handlers, but not to make a variable of built-in type thread-safe. In fact, volatile has lead to much confusion because of this.
However, it has been added to function overloads of std::atomic<T>
types, which suggests that there be a usecase for this. What are usecases of these operations?