Agree. And its not the type for any kind of functionality other than simple atomic operations.
IMO, `std::atomic` should not have notify/wait semantics at all, but that cat's out of the bag. I wish there were a way to remove them and add another class with that functionality, but that would be a backward-breaking change, and we are very reluctant to make those kinds of changes.
Basically, these are separate concerns and should not be part of the same class.
As it stands, `std::atomic_ref` also inherits this madness, which means you can't even do the "safe" thing and put builtins into shared memory and use `std::atomic_ref` safely. Yes, you bypass the implicit lifetime issues, but now you have an interface that is very easy to use in contexts that are almost certain to cause real damage.
I understand the C++ stance on processes very well, but the only place we mention processes in the standard is when we clearly state that using atomics across process boundaries in shared memory is a supported use case.
I'd be very much opposed to adding even more junk to `std::atomic`, no matter how supposedly useful.
If we want to add stuff to make using atomics easier - fine - add them as separate APIs. Please don't keep making them more difficult to use correctly.