Date: Wed, 14 May 2025 07:13:17 +0200
That's exactly what I wanted! Thanks, didn't know someone else would make
that proposal.
Tymi.
On Wed, 14 May 2025, 07:12 Pavel Vazharov, <freakpv_at_[hidden]> wrote:
>
>
> On Wed, May 14, 2025 at 8:09 AM Pavel Vazharov <freakpv_at_[hidden]> wrote:
>
>>
>> On Wed, May 14, 2025 at 8:05 AM Tymi via Std-Proposals <
>> std-proposals_at_[hidden]> wrote:
>>
>>> A matching switch expression could be useful and could get optimised
>>> into a jump table
>>> ```cpp
>>> int meow = 5;
>>> int purr = switch(meow)
>>> {
>>> case 5: 123;
>>> case 123: 321;
>>> default: throw nullptr;
>>> };```
>>> Whatever the syntax would be, this is just an example and it can
>>> definitely improve
>>>
>> It's probably covered by the proposed pattern matching
>> <https://wg21.link/p2688>
>> And/or by the proposed do expressions <https://wg21.link/p2806>.
>>
>>>
>>> Tymi.
>>> --
>>> Std-Proposals mailing list
>>> Std-Proposals_at_[hidden]
>>> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>>>
>>
that proposal.
Tymi.
On Wed, 14 May 2025, 07:12 Pavel Vazharov, <freakpv_at_[hidden]> wrote:
>
>
> On Wed, May 14, 2025 at 8:09 AM Pavel Vazharov <freakpv_at_[hidden]> wrote:
>
>>
>> On Wed, May 14, 2025 at 8:05 AM Tymi via Std-Proposals <
>> std-proposals_at_[hidden]> wrote:
>>
>>> A matching switch expression could be useful and could get optimised
>>> into a jump table
>>> ```cpp
>>> int meow = 5;
>>> int purr = switch(meow)
>>> {
>>> case 5: 123;
>>> case 123: 321;
>>> default: throw nullptr;
>>> };```
>>> Whatever the syntax would be, this is just an example and it can
>>> definitely improve
>>>
>> It's probably covered by the proposed pattern matching
>> <https://wg21.link/p2688>
>> And/or by the proposed do expressions <https://wg21.link/p2806>.
>>
>>>
>>> Tymi.
>>> --
>>> Std-Proposals mailing list
>>> Std-Proposals_at_[hidden]
>>> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>>>
>>
Received on 2025-05-14 05:13:31