"Error: `TypeInfo` cannot be used with -betterC" on a CTFE function

Liam McGillivray yoshi.pit.link.mario at gmail.com
Sun Apr 7 22:45:29 UTC 2024


On Sunday, 7 April 2024 at 08:59:55 UTC, Richard (Rikki) Andrew 
Cattermole wrote:
> Unfortunately runtime and CTFE are the same target in the 
> compiler.

:-(
Will this ever be changed?

> ```d
> template Foo(Args) {
> 	enum Foo = () {
> 		return Args.init;
> 	}();
> }
> ```
>
> Something like that should work instead.

I'm sorry, but I can't comprehend any of your example. What would 
be fed into `Args`? I don't understand how this works, or how I 
would use it for what I want.


More information about the Digitalmars-d-learn mailing list