C++ Logo

std-proposals

Advanced search

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

From: Muneem <itfllow123_at_[hidden]>
Date: Mon, 20 Apr 2026 12:47:53 +0500
Credits to this video:
https://www.youtube.com/watch?v=LDPMpc-ENqY
like in this video, at the end, he describes std::apply that was useful for
folding tuples for me. I was lucky to see this a month ago while learning
random number generators and reading Bjarne's great book. Without this
video, My code couldn't be completed, like most of it is basic, except the
part where I used std::apply because that was what took 3 hours to get a
hint of, which is when this video came into mind somehow. Funny how the
world is, like I programmed in my dream, literally solving this puzzle.
This puzzle may look basic to the old timers but for me, this basic puzzle
took like an honest 4 hours to prototype and 6 hours to fix
completely(about 10 if you count the 2-4 hours in my dream).

On Mon, Apr 20, 2026 at 12:25 PM Muneem <itfllow123_at_[hidden]> wrote:

> My code is complete:
>
> https://github.com/HjaldrKhilji/Future-potential-ISO-porposals/blob/main/Code_example.cpp
> https://godbolt.org/z/WWoWrd3q1
> My updated proposal is also attached and is also on the github link:
>
> https://github.com/HjaldrKhilji/Future-potential-ISO-porposals/blob/main/Runtime_Indexed_Tuples_Proposal_Official%20(1).docx
>
> Again, I am sorry for taking so much time on such trivial code. I know I
> should be faster, so hope it dosent reflect badly on the technical merit of
> my proposal
>
> On Sun, Apr 19, 2026 at 11:22 PM Muneem <itfllow123_at_[hidden]> wrote:
>
>> https://godbolt.org/z/rs34q1Wj9
>> This is what I got till today, I will debug this tomorrow, but yeah, I
>> just wanted to show what's done till now before going to sleep.
>>
>> On Sun, Apr 19, 2026 at 8:54 PM Muneem <itfllow123_at_[hidden]> wrote:
>>
>>> I am really really sorry that previously my code was not only using
>>> enable if but also the pattern of making types unique was wrong. I promise
>>> that I will fix it tomorrow and will test every possible specialization to
>>> make sure such mistakes don't occur again. Again, really really sorry. I am
>>> almost done with the proper code but it's just a little bit left that I
>>> left for tomorrow. I know it's nothing special and that I should be better
>>> at wiring such basic code but things happen and in my case, it would to not
>>> think properly so as to use recursion with conditinal_t.
>>>
>>> Regards, Muneem
>>>
>>> On Sun, 19 Apr 2026, 8:28 pm Thiago Macieira via Std-Proposals, <
>>> std-proposals_at_[hidden]> wrote:
>>>
>>>> On Sunday, 19 April 2026 01:01:13 Pacific Daylight Time Muneem via Std-
>>>> Proposals wrote:
>>>> > This is the example implementation code:
>>>>
>>>> Send the link to the working implementation in godbolt or your
>>>> repository on
>>>> GitHub/GitLab/equivalent.
>>>>
>>>> --
>>>> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>>>> Principal Engineer - Intel Data Center - Platform & Sys. Eng.
>>>> --
>>>> Std-Proposals mailing list
>>>> Std-Proposals_at_[hidden]
>>>> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>>>>
>>>

Received on 2026-04-20 07:48:08