C++ Logo

std-proposals

Advanced search

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

From: Thiago Macieira <thiago_at_[hidden]>
Date: Mon, 27 Mar 2023 22:28:50 -0700
On Monday, 27 March 2023 10:30:22 PDT Phil Endecott via Std-Proposals wrote:
> Clearly the throw-catch implementation has a huge overhead. Making it
> possible to do this portably, i.e. by standardising the functionality
> provided by std::type_info::__do_catch, would be useful IMO.

It's unnecessary to standardise __do_catch. std::any is a Standard Library
type; so long as it is possible in all implementations and reasonably fast in
most, it can be standardised. You've shown it's possible in all that are
compliant (disabling RTTI or exceptions isn't compliant), so one hurdle is
overcome. You've shown it is fast in one implementation, so half of the other
is done too.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DCAI Cloud Engineering

Received on 2023-03-28 05:28:52