Return type deduction
Adam D. Ruppe via Digitalmars-d
digitalmars-d at puremagic.com
Mon Sep 5 05:31:40 PDT 2016
On Monday, 5 September 2016 at 09:59:16 UTC, Andrea Fontana wrote:
> I asked this some time (years?) ago. Time for a second try :)
Return type deduction probably won't work, but implicit casts of
a custom data type could do this - that's how C++ would do it.
Alas, D does not have an implicit cast operator :( best we have
is `alias this` but it only allows one right now (despite the
book saying it is supposed to do multiple.. and there are some
PRs about it). They wouldn't be templated but json could just do
a few implicit casts.
More information about the Digitalmars-d
mailing list