link-time codegen assert?

Tove tove at fransson.se
Tue Oct 1 05:34:19 PDT 2013


On Tuesday, 1 October 2013 at 11:42:20 UTC, Tove wrote:
> A very minimal example:
>
> template ctfe(alias any)
> {
>   alias ctfe = any;
> }
>
> double ms(double val) pure nothrow @property
> {
>   if(__ctfe)
>     return val / 1000.0;
>   else
>     assert(false);
> }
>

Turns out it was quite easy to solve...
void link_assert() pure nothrow; link_assert();


More information about the Digitalmars-d mailing list