auto ref deduction and common type deduction inconsistency
ketmar via Digitalmars-d
digitalmars-d at puremagic.com
Wed Aug 20 07:52:47 PDT 2014
On Wed, 20 Aug 2014 14:44:40 +0000
Peter Alexander via Digitalmars-d <digitalmars-d at puremagic.com> wrote:
> Well, the return type is already the common type of all return
> paths
no, it's not. the return type will be taken from the first return
statement in code.
> That doesn't help at all. I want return by ref when possible, not
> always return by value. If I wanted return by value, I'd just
> return by value!!
you can't return ref and non-ref simultaneously from one function.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20140820/2333f160/attachment-0001.sig>
More information about the Digitalmars-d
mailing list