Possible to avoid downcasting?

Steven Schveighoffer schveiguy at gmail.com
Thu Dec 26 17:11:24 UTC 2019


On 12/24/19 3:15 PM, Adam D. Ruppe wrote:
> // the lazy here....
> T make(T)(lazy T t) {
>          populate(t);
>          return t;
> }
> 
> class Foo {}
> 
> void main() {
>          // means the new Foo down there is automatically lambdaized
>          auto tree = make(new Foo);
> }

I see a bug ;)

-Steve


More information about the Digitalmars-d mailing list