> On Jun 6, 2021, at 5:41 PM, Paul Smith <p...@mad-scientist.net> wrote:
>
> I have a class which is NOT, as far as I can see, polymorphic.
>
> It doesn't inherit from any other class and none of its methods are
> declared virtual. The class implementation and all its callers all
> compile just fine.
>
> Is there some other way that a class can be thought to be virtual,
> stealthily (say by its usage in some other class or something)?
I may be remembering wrong, but -- doesn't dynamic_cast look for a vtable? So
if you do a dynamic cast mentioning that class you'd get such a reference. Or
is that an error when applied to a non-polymorphic class?
paul