Deducing a template retrun parameter type based on an assignment?

bearophile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jan 30 00:52:40 PST 2015


Jeremy DeHaan:

> I figured that it would be smart enough to
> deduce the parameter type based on the type that it was trying 
> to be assigned to.

For that you need languages like Haskell/Rust. D type inference 
doesn't work from the type something is assigned to.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list