Template return values?

Jonathan M Davis jmdavisProg at gmx.com
Tue Dec 4 10:40:52 PST 2012


On Tuesday, December 04, 2012 21:43:09 Dmitry Olshansky wrote:
> Well TDPL claims multiple alias this is allowed so in some distant
> future it maybe possible for Varaint to alias this to all built-in types.

That would be pretty hideous IMHO. There's a reason that D eschews implicit 
conversions in general. And in this case, you'd very quickly end up with 
accidental conversions which resulted in exceptions being thrown by Variant. I 
think that it's _much_ better to require explicit conversions from Variant.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list