C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Extend std::type_info with more information

From: Thiago Macieira <thiago_at_[hidden]>
Date: Fri, 12 Apr 2024 09:31:20 -0700
On Friday 12 April 2024 08:56:09 GMT-7 Frederick Virchanza Gotham via Std-
Proposals wrote:
> Here's the first thing I propose, it's a standalone function:
>
> template<class Base> requires is_class_v<Base>
> Base *base(void *const p, type_info const &ti) noexcept
> {
> // returns a valid pointer to the base class
> // with the 'this' pointer adjusted if necessary,
> // or returns nullptr if 'Base' isn't a base.
> }

Remove this. This is a means-to-an-end, not the objective.

Your paper should be only about std::any. It should not talk about *how* to
implement the functionality. It may want to list your investigations that the
information is available already and thus should be implementable without
breaking ABI.

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

Received on 2024-04-12 16:31:24