On Wednesday, 5 March 2014 at 23:17:45 UTC, Frustrated wrote:
how does an enum return type work?

enum foo(string s) { return s; }

is it a purely compile time construct?

That is, we can guarantee that foo, as a function, won't exist at runtime? e.g., it is a true ctfe instead of a function that can be executed at compile time or runtime?

It's not currently possible to force something out of the binary, but to guarantee that something isn't called at runtime you can always just add an assert(__ctfe); at the start of the function or in the "in" contract.

Reply via email to