The problem is: ExampleIt which inherits (and overrides methods) from class It, so that when I overload operator in class Wrapped (which calls some methods from It, which should be overridden by ExampleIt.
The wanted effect is that when I overload operator* I should be able to call *name_of_Wrapped_class and this should execute virtual method dereference (from It) which should be overridden by ExampleIt.
class It {
public:
virtual std::pair<int, std::string> dereference() const;
};
class ExampleIt : It {
public:
std::pair<int, std::string> dereference() const override;
};
class Wrapped : It{ //??? not sure about that
public:
std::pair<int, std::string> operator*() const; // it should call for dereference()
};