I'm trying make a virtual method that takes a vector of a specific type in parameter.
This is the parent class:
template <typename T>
class Syncable
{
virtual void update(vector<typename T::PropertyType>& properties) = 0
};
This is the child class:
class MyUser : public Syncable <MyUser>
{
public:
enum class Property
{
Id,
DisplayName
};
using PropertyType = Property;
virtual void update(vector<PropertyType>& properties) override
{
cout << "Update";
}
};
However, I get the following error:
error C2039: 'PropertyType': is not a member of 'MyUser
I think it might say so because in the Syncable
class, MyUser is not defined yet. How can I workaround this problem?
I use Visual Studio 2015.