i have a strange problem since i switched the C++ language standard in VS2022 for my c++ project from 17 to 20.
I get compiler error C3861 identifier not found. The indentifier in this case is a member of the base class.
base class:
template <class C> class base_vector
{
public:
base_vector()
{
}
virtual ~base_vector()
{
}
protected:
std::vector<C> m_vec;
};
derived class:
template <class C> class child_vector : public base_vector<C>
{
public:
child_vector()
{
}
virtual ~child_vector()
{
m_vec.clear(); // c3861
}
};
When i switch the standard to c++17, no compiler error.
m_vec should be known in child_vector but it's not. Can anyone see the problem ? Many thanks