Schrodinger's CTFE

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Jul 16 20:51:11 UTC 2020


On 7/16/20 12:04 PM, Steven Schveighoffer wrote:
> On 7/16/20 2:32 AM, Andrei Alexandrescu wrote:
>> I got good news for you then: https://github.com/dlang/dmd/pull/11236
> 
> That is good news, and will help here!
> 
> This should suffice:
> 
> @property pure @safe nothrow bool reachable() {
>     pragma(inline, true);
>     return true;
> }
> 
> Though I don't know if this is something we should include in Phobos?

Perhaps in std.benchmark. This function is loosely related to 
DoNotOptimize in https://github.com/google/benchmark.


More information about the Digitalmars-d mailing list