C++ Logo


Advanced search

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

From: Sebastian Wittmeier <wittmeier_at_[hidden]>
Date: Tue, 27 Feb 2024 23:41:31 +0100
static_cast<Derived*>(&arg)->open(); and static_cast<Derived&>(arg).open(); work. You used the mix static_cast<Derived&>(arg)->open(); -----Urspr√ľngliche Nachricht----- Von:Frederick Virchanza Gotham via Std-Proposals <std-proposals_at_[hidden]> Gesendet:Di 27.02.2024 22:07 Betreff:Re: [std-proposals] dynamic_cast<void*>(void*) An:std-proposals_at_[hidden]; CC:Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>; On Tue, Feb 27, 2024 at 3:58 PM Thiago Macieira wrote: > > Never mind, then. I've never used dynamic_cast in that scenario precisely > because static_cast works, so I didn't actually remember it was already > forbidden. We're downcasting here -- not upcasting. Replacing dynamic_cast with static_cast won't work here. -- Std-Proposals mailing list Std-Proposals_at_[hidden] https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2024-02-27 22:41:32