On Saturday, 15 April 2023 at 15:47:40 UTC, Steven Schveighoffer wrote:
You can construct objects at compile time.

If I understand your question properly:

```d
struct Wrapper
{
   Object x = new Object();
   alias x this;
}

void foo(Object o)
{
   assert(o !is null);
}

void main()
{
   Wrapper w;
   foo(w);
}
```

-Steve

Amazing, was this always so?



Reply via email to