Request for Comment assert(__ctfe)
Stefan Koch
uplink.coder at googlemail.com
Tue Apr 7 20:43:10 UTC 2020
On Tuesday, 7 April 2020 at 17:52:44 UTC, Jacob Carlborg wrote:
>
> void foo()
> {
> assert(__ctfe);
> }
>
> void main() @system
> {
> try
> foo();
> catch (AssertError)
> {}
> }
firstly Does anybody actually do this?
secondly your program either complies with no change (i.e. the
assert never fired), or you get a message telling you that
ctfe-only functions can't be called at runtime.
More information about the Digitalmars-d
mailing list