C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Get base class from std::any

From: Arthur O'Dwyer <arthur.j.odwyer_at_[hidden]>
Date: Wed, 29 Mar 2023 11:20:34 -0400
On Wed, Mar 29, 2023 at 11:19 AM Arthur O'Dwyer <arthur.j.odwyer_at_[hidden]>
wrote:

> On Wed, Mar 29, 2023 at 11:13 AM <language.lawyer_at_[hidden]> wrote:
>
>> > Returns: If p is non-null, dynamic_cast<B>((D*)p). Otherwise, null.
>>
>> Isn't this equivalent to just «Returns: dynamic_cast<B>((D*)p)»?
>>
>
> Heh, yes. Username checks out. ;)
>

...argh, and before anyone else says it: yeah, I meant
`dynamic_cast<B*>((D*)p)`. Was missing an asterisk there.

Received on 2023-03-29 15:20:46