C++ Logo

std-proposals

Advanced search

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

From: Matthew Taylor <mjtaylor214_at_[hidden]>
Date: Wed, 17 Apr 2024 12:17:24 +0000
> There are two possible papers to submit:
>
> (1) Add functionality to std::any to get a base class
>
> (2) Add functionality to std::any to get a base class without causing an ABI break


I would disagree. I would argue that the only important question at this early stage of the process is whether std::any::base belongs in the language. If the answer to that question is no, then whether or not it is implementable is irrelevant. And while no doubt it is an achievement to be able to engineer yourself an ABI-stable test on some of the major implementations, that doesn't add to the proposal anywhere near as much as answering the basic question of why this belongs in the language in the first place. Indeed in your linked draft paper you don't even include a motivation section - you just skip from the introduction straight to a possible implementation.

It may be obvious or even self-evident to you why you want this feature. It isn't to us. Tell us why this is a good idea; particularly why it is preferable to taking one of the other approaches to the problem which have been suggested in the past few weeks' extended discussion on this series of suggestions. Tell us why it belongs in every C++ developer's toolbox rather than just your own personal one. We don't need to know every stage of your investigation into how Microsoft store their type information; we need to know why this idea is worth adding.

Received on 2024-04-17 12:17:30