`return const` parameters make `inout` obsolete

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Mon Mar 16 07:23:42 PDT 2015


On Mon, 16 Mar 2015 14:17:57 +0000, Zach the Mystic wrote:

> char* fun(return const char* x);
> 
> Compiler has enough information to adjust the return type of `fun()` to
> that of input `x`. This assumes return parameters have been generalized
> to all reference types. Destroy.

but why compiler has to rewrite return type? i never told it to do that!
-------------- 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/20150316/3adf07a1/attachment.sig>


More information about the Digitalmars-d mailing list