There is a sentence in the cppreference.com description of Deleted functions:
However, implicit ODR-use of a non-pure virtual member function that happens to be deleted is allowed.
Could you provide a code example of this case?
I tried to do this:
struct ff
{
virtual int fd()
{
return 0;
}
};
struct ddff : public ff
{
int fd()
{
throw std::exception("ttt");
}
};
struct dd : public ddff
{
int fd() = delete;
};
int main()
{
ff* d = new dd();
d->fd();
But it brings a error:
Error C2282 'dd::fd' cannot override 'ddff::fd'
Thanks for comment: