We recently found issue with our project caused by this error:
namespace sim
{
class ClassA
{
private:
static std::list<uint16_t> m_variable;
}
std::list<uint16_t> ClassA::m_variable;
}
So what happened is that m_variable became static for all instances of ClassA, not just for the particular instance of it. I'm not an expert with C++ so please bear with me if the problem is staring directly at my face, I'm still on the learning phase.
Can someone explain why this happened?