Hidden Not Overridden
None of the declarations in Lru uses the override keyword. Calls go through a Base*.
struct Key;
struct Base {
virtual std::size_t size() const;
virtual void evict(const Key& k);
virtual Base* clone() const;
virtual void flush(int level = 0);
virtual ~Base();
};
struct Lru : Base {
std::size_t size(); // A
void evict(Key& k); // B
Lru* clone() const; // C
void flush(int level = 3);// D
};
More than one of these fails to override the base version. Which ones?
Sign in to answer questions and track your progress
Sign In