Request for Comment assert(__ctfe)

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Apr 9 00:02:16 UTC 2020


On Wed, Apr 08, 2020 at 05:45:43PM -0600, Jonathan M Davis via Digitalmars-d wrote:
[...]
> It would arguably be cleaner if __ctfe were done in a way that it were
> a static condition rather than a runtime one (and thus static assert
> could be used instead), but that's not how it works, and from what I
> understand of how CTFE in general works, it's highly unlikely that
> that will ever change.
[...]

Yeah, static assert is run at template expansion time, which comes
before CTFE, so __ctfe cannot be evaluated by static assert:

	https://wiki.dlang.org/User:Quickfur/Compile-time_vs._compile-time


T

-- 
WINDOWS = Will Install Needless Data On Whole System -- CompuMan


More information about the Digitalmars-d mailing list