Polymorphic ranges?

Dmitry Olshansky dmitry.olsh at gmail.com
Sun May 1 11:46:52 PDT 2011


On 01.05.2011 21:40, Andrej Mitrovic wrote:
> Btw,
>
>   * Limitations:
>   *
>   * These interfaces are not capable of forwarding $(D ref) access to elements.
>
> Why not? I can use auto ref to make e.g. an input range interface that
> can return ref elements:
>
> http://codepad.org/kmenIDk7
>
> Why aren't the interfaces defined like that in std.range?
One reason might be is that it was implemented under worse compiler 
condition ;)
Seems worthy of a bug report, or better yet a pull request.

-- 
Dmitry Olshansky



More information about the Digitalmars-d-learn mailing list