C++ Logo

std-proposals

Advanced search

Re: [std-proposals] dynamic_cast<void*>(void*)

From: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Date: Mon, 26 Feb 2024 11:36:13 +0000
On Mon, Feb 26, 2024 at 10:46 AM Sebastian Wittmeier wrote:
>
> Does this work with multiple inheritance?


Here's a GodBolt showing it working with multiple inheritance (a
mixture of virtual inheritance and non-virtual inheritance) with GNU
g++, LLVM clang++, and the Intel ICX compiler:

    https://godbolt.org/z/T7T8qvETE

In order to code it for the Microsoft compiler, I'd have to look at
how they lay out the 'metadata' struct at the beginning of the vtable.

Received on 2024-02-26 11:36:26