If I have in my .h file
class A
{
...
protected:
static std::mutex someMutex;
}
What is proper way to instantiate it in the cpp file? Just to write
std::mutex A::someMutex;
? It works, but just such syntax where I basically declare a field twice feels a bit confusing, so I decided to doublecheck asking here, also maybe there are some other(better?) ways?