What should happen if clog() is called in two threads and then unclog() is called in the first?
Why are you creating a unique_ptr at all? Surely, as you don't want to follow the model used in std (e.g. unique_lock), all that you need to return is a move-only type that calls unclog() in the destructor?
I still think that clog()/unclog() are dubious.
What should happen if clog() is called in two threads and then unclog() is called in the first?
Why are you creating a unique_ptr at all? Surely, as you don't want to follow the model used in std (e.g. unique_lock), all that you need to return is a move-only type that calls unclog() in the destructor?
~~~~
234 +protected
line noise