This would only be correct as

    ~ {
        if ( IsHardwareDevice(h) )
            FreeDevice(h);
        else
            FreeResource(h);
    };


Thiago Macieira via Std-Proposals <std-proposals@lists.isocpp.org> ezt írta (időpont: 2022. dec. 12., H, 14:55):
On Monday, 12 December 2022 07:32:34 -03 Frederick Virchanza Gotham via Std-
Proposals wrote:
> You see the curly tilde symbol ~, well my intention is that you locate
> that symbol in the code, and then you look to the left of it to find
> the first open curly brace, i.e. {.

In other words, this

    if ( IsHardwareDevice(h) ) {
        ~ { FreeDevice(h); }
    } else {
        ~ { FreeResource(h) };
    }

is different from this

    if ( IsHardwareDevice(h) )
        ~ { FreeDevice(h); }
    else
        ~ { FreeResource(h) };

?

This sounds like a major flaw to me that would cause your feature suggestion to
be DOA.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DCAI Cloud Engineering



--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals