Using inout in delegates
Jacob Carlborg
doob at me.com
Sun Oct 7 07:04:54 PDT 2012
On 2012-10-05 16:09, Ali Çehreli wrote:
> This workaround makes the compiler happy:
>
> void foo (inout(int)[] arr)
> {
> auto a = (inout int) { auto b = arr[0]; };
> }
>
> But probably not what you want. :/
>
> IIRC, inout has bugs and incomplete implementation. I think this should
> be in the bug database.
Using the above workaround did make it compile. But using typeid it now
contains "inout" instead. It turns out I didn't need neither "const" or
"inout", don't know why I added it in the first place. Thanks anyway.
--
/Jacob Carlborg
More information about the Digitalmars-d-learn
mailing list