C++ Logo

std-proposals

Advanced search

Re: [std-proposals] std::any ehancement

From: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Date: Mon, 13 May 2024 09:54:52 +0100
On Mon, May 13, 2024 at 8:45 AM Ahmed Elbadawy wrote:
>
> With the proposed conversion function, we can use the builtin
> static_cast which is more convenient to be used than the template
> function std::any_cast.


It would be nice to if this new cast could also cast to a base class,
as follows:

    http://www.virjacode.com/papers/any_base.htm

But I gave up on this when I discovered that this isn't possible on
the Microsoft compiler without an ABI break.

Received on 2024-05-13 08:54:58