D-ark corners - algorithms, ranges, and auto ref - best practices guides.

Timon Gehr timon.gehr at gmx.ch
Tue Jul 23 15:40:42 UTC 2019


On 23.07.19 15:51, aliak wrote:
> 
> (Side note: the specification for return ref - 
> https://dlang.org/spec/function.html#return-ref-parameters - says that 
> "inout ref parameters imply the return attribute.", but I got corruption 
> with "ref inout(T) front() inout {...}". Is that a bug with inout?)

I think in this case the specification is at fault. It's perfectly fine 
(and useful) to have an `inout` function that returns `void`.


More information about the Digitalmars-d mailing list