C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Extension to std::tuples to allow runtime indexing.

From: Muneem <itfllow123_at_[hidden]>
Date: Sat, 18 Apr 2026 19:42:43 +0500
I use terms from wilkipedia since I don't want to be wrong or arrogant
enough to think I am always right, but since you are asking me about it:
A tuple is a product type, which means it's a type that has lists of
objects that can be of any type and nothing else. That's the defintion.
Tuples and structs were built to fit just that. Where as my type is meant
to not fit that, which means that it can have additional book keeping
information.

Sorry for the confusion. I am 17 and new to all this, so I am trying to
cite other sources just to stay correct.

On Sat, 18 Apr 2026, 7:32 pm Giuseppe D'Angelo via Std-Proposals, <
std-proposals_at_[hidden]> wrote:

> On 18/04/2026 16:24, Muneem via Std-Proposals wrote:
> > What I meant, by "tuples have overhead" is that they have a fixed ABI
> > for all their specaizations, which means that any book keeping has to be
> > on the top of the tuple and can't be inside it.
>
> What does "on top of" or "inside it" mean?
> Can you show some code? Or even some pseudocode?
>
>
> > Since runtime indexed
> > tuples are a completely different notion than compile indexed tuple
> > since one is a product type like a struct. Runtime indexed tuples is
> > heterogeneous list.
>
> Again, I don't understand what any of this means.
>
> Please don't use "overloaded" words. People come from all sorts of
> backgrounds and using these words just causes confusion. Instead please
> provide the definitions yourself, and add lots of examples to make sure
> there's no misunderstandings.
>
> For instance, what you consider a "heterogeneous list" may not be what
> other people consider as such. One may understand that as a
> std::vector<std::any>.
>
>
> My 2 c,
>
> --
> Giuseppe D'Angelo
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2026-04-18 14:43:00