C++ Logo


Advanced search

Re: [std-proposals] Base class reflection

From: Jonathan Wakely <cxx_at_[hidden]>
Date: Mon, 30 Jan 2023 14:06:25 +0000
On Mon, 30 Jan 2023, 06:55 Sebastian Wittmeier via Std-Proposals, <
std-proposals_at_[hidden]> wrote:

> Some short public discussions about N2965 and its state of implementation.
> https://stackoverflow.com/questions/18435001/what-is-the-status-of-n2965-stdbases-and-stddirect-bases
> https://stackoverflow.com/questions/51320845/status-of-stdbases-and-stddirect-bases

As noted in the stackoverflow comments, GCC already supports the intrinsics
needed for this feature and libstdc++ defined the type traits using those

I would expect any proposal in this space to discuss the previous
proposals, and implementation status.

I would also expect to see more discussion about std::tuple<base&...> vs
std::tuple<type_identity<base>...> vs a dedicated type_list<base...> type.
The considerable compile-time overhead of std::tuple<type_identity<T>...>
could be avoided by specialising std::tuple for that case, if necessary.
And we could even define type_list<T...> as an alias for that

Received on 2023-01-30 14:06:39