August 07, 2019
Hi:
    In C there has likely unlikely marco used by condition expression。
    #define likely(x) __builtin_expect(!!(x), 1)
    #define unlikely(x) __builtin_expect(!!(x), 0)
    if (likely(var > 1)) do...

    How to do this in Dlang?
August 07, 2019
On Wednesday, 7 August 2019 at 11:37:06 UTC, lili wrote:
> How to do this in Dlang?

Just as in C, this isn't standardized, and I don't think DMD has such a thing. For LDC, see https://forum.dlang.org/thread/ecycecfohgcqkfapiplk@forum.dlang.org.