Should std.algorithm.find demand a reference to range elements?
Jakob Ovrum via Digitalmars-d
digitalmars-d at puremagic.com
Thu Feb 5 03:11:36 PST 2015
On Thursday, 5 February 2015 at 11:06:39 UTC, Jakob Ovrum wrote:
> On Thursday, 5 February 2015 at 11:04:41 UTC, Daniel Murphy
> wrote:
>> "Jakob Ovrum" wrote in message
>> news:flxonctqqtzmtyintbtj at forum.dlang.org...
>>
>>> However, this would set a possibly disruptive precedent that
>>> range algorithms must no longer use foreach on aggregate
>>> types...
>>
>> I think this precedent already exists thanks to the bad
>> behavior of foreach over narrow strings.
>
> Good point.
>
> I'll file a PR for `find` in any case.
https://github.com/D-Programming-Language/phobos/pull/2964
More information about the Digitalmars-d
mailing list