Using map result type

Dominikus Dittes Scherkl dominikus.scherkl at
Tue Dec 10 15:15:26 UTC 2019

On Tuesday, 10 December 2019 at 07:23:56 UTC, AA wrote:

> Would the second solution of declaring a template constraint 
> like that be considering strange/out of place in D? e.g. do 
> people normally try and declare the template constraints on a 
> function or just rely on compile time failure from to 
> instantiate template.

No, you can do "normal" OOP as you like. But you will encounter 
the constraint approach often in phobos and other libraries, as 
is provides some advantages.

More information about the Digitalmars-d-learn mailing list