Date: Tue, 7 Apr 2026 14:38:44 +0500
>You didn't answer my question: Would I write it like this?
int^ var = hlist.select(0);
Is it correct (as an example) to use 'int' as a type here? Or what is the T
in T^ allowed to be? If my syntax to use it is wrong, could you please
provide an example how to use it?
****ANSWER****
Yes, and you can also assign it to a int var, in which case the T^ found at
compile time will decay into T. Though using the <> for gurrenties compile
time instantion (no runtime code for branching) could also be better.
PS: Looks like I accidentally took this discussion private. Would you mind
sharing this discussion with the list?
I will try to do so by responding to you and std::proposal
On Tue, 7 Apr 2026, 2:35 pm Simon Schröder, <dr.simon.schroeder_at_[hidden]>
wrote:
> On Tue, Apr 7, 2026 at 9:16 AM Muneem <itfllow123_at_[hidden]> wrote:
>
>> >I still don’t fully understand T^ because you are saying that it can
>> decay to T, T& or T&&. Is T^ a variant of several types? Or is it just one
>> specific type or nothing? What I mean is the following:
>> int^ var = hlist.select(0);
>> Would I write it like this? Should var be an int only if at index 0 there
>> is an int in the heterogeneous list? And otherwise I could not do anything
>> with that variable?
>>
>> ****ANSWER****
>> 1.Every element in the heterogeneous list would be of type
>> type_set(selector), this type could decay into T^, when ever used in an
>> expression, T^ can itself decay into T& or T&&. T^ provides the benefits
>> that I talked about in the beginning of my email.
>>
>
> You didn't answer my question: Would I write it like this?
> int^ var = hlist.select(0);
> Is it correct (as an example) to use 'int' as a type here? Or what is the
> T in T^ allowed to be? If my syntax to use it is wrong, could you please
> provide an example how to use it?
>
> PS: Looks like I accidentally took this discussion private. Would you mind
> sharing this discussion with the list?
>
int^ var = hlist.select(0);
Is it correct (as an example) to use 'int' as a type here? Or what is the T
in T^ allowed to be? If my syntax to use it is wrong, could you please
provide an example how to use it?
****ANSWER****
Yes, and you can also assign it to a int var, in which case the T^ found at
compile time will decay into T. Though using the <> for gurrenties compile
time instantion (no runtime code for branching) could also be better.
PS: Looks like I accidentally took this discussion private. Would you mind
sharing this discussion with the list?
I will try to do so by responding to you and std::proposal
On Tue, 7 Apr 2026, 2:35 pm Simon Schröder, <dr.simon.schroeder_at_[hidden]>
wrote:
> On Tue, Apr 7, 2026 at 9:16 AM Muneem <itfllow123_at_[hidden]> wrote:
>
>> >I still don’t fully understand T^ because you are saying that it can
>> decay to T, T& or T&&. Is T^ a variant of several types? Or is it just one
>> specific type or nothing? What I mean is the following:
>> int^ var = hlist.select(0);
>> Would I write it like this? Should var be an int only if at index 0 there
>> is an int in the heterogeneous list? And otherwise I could not do anything
>> with that variable?
>>
>> ****ANSWER****
>> 1.Every element in the heterogeneous list would be of type
>> type_set(selector), this type could decay into T^, when ever used in an
>> expression, T^ can itself decay into T& or T&&. T^ provides the benefits
>> that I talked about in the beginning of my email.
>>
>
> You didn't answer my question: Would I write it like this?
> int^ var = hlist.select(0);
> Is it correct (as an example) to use 'int' as a type here? Or what is the
> T in T^ allowed to be? If my syntax to use it is wrong, could you please
> provide an example how to use it?
>
> PS: Looks like I accidentally took this discussion private. Would you mind
> sharing this discussion with the list?
>
Received on 2026-04-07 09:38:59
