pragma(__ctfe)

H. S. Teoh hsteoh at qfbox.info
Thu Sep 28 04:08:23 UTC 2023


On Thu, Sep 28, 2023 at 04:35:10PM +1300, Richard (Rikki) Andrew Cattermole via Digitalmars-d wrote:
> I certainly would prefer ``assert(__ctfe);``.

+1.

Maybe also detect code of the following form?

	auto func(Args args) {
		if (__ctfe) {
			...
		}
		else assert(0);
	}


T

-- 
If it breaks, you get to keep both pieces. -- Software disclaimer notice


More information about the Digitalmars-d mailing list