I implemented the following base class and derived classes respectively
class observerInterface {
public:
virtual void update(std::string data) = delete;
virtual const std::string & getUniqueID() = delete;
private:
//deleting copy constructor and copy operator.
observerInterface(const observerInterface &) = delete;
observerInterface & operator=(const observerInterface &) = delete;
};
class observer1 final : public observerInterface {
static constexpr auto UNIQUE_ID = "observer1";
public:
void update(std::string data) override;
const std::string & getUniqueID() override;
};
I am facing the following error :
nondeleted function overrides deleted function "observerInterface::******"C/C++(1789).
The issue is not present when I don't delete the update
and getUniqueID
methods in the base class.
Any idea why I obtain this error?
I am using MSVC compiler version : 19.16.27032.1