C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Fwd: Extension to runtime polymorphism proposed

From: Muneem <itfllow123_at_[hidden]>
Date: Tue, 7 Apr 2026 15:27:05 +0500
T^ is not the same as type_set(selector), it's basically so the user can
provide overloads for the elements of selector. Why is important? The main
use case of a homogenous list would probably be JSON parsers, http packet
parsers, in these cases, the user(the system using this tool) maybe allowed
to pass an index, but he isn't allowed to see everything, so when ever he
tries to access a cookiee object, an overload for cookie^ would be called
to see if he can have those delicious (if you don't know cookies are,
imagine them as delicious food) cookies. Where as the programmer himself
can have it using ordinary functions that accept cookie or lvalue or rvalue
references of cookie. So T^ is to make the usage safe for the common
probable use case.

On Tue, 7 Apr 2026, 2:47 pm Simon Schröder via Std-Proposals, <
std-proposals_at_[hidden]> wrote:

>
>
> On Tue, Apr 7, 2026 at 11:39 AM Muneem <itfllow123_at_[hidden]> wrote:
>
>>
>> Yes, and you can also assign it to a int var, in which case the T^ found
>> at compile time will decay into T.
>>
>> Now, I even understand less: Isn't T^ either the same as T or
> type_set(selector)? What can T^ do that neither T nor type_set(selector)
> can do?
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2026-04-07 10:27:18