[Issue 21650] parse form that returns elements parsed is too difficult to use

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 21 15:13:36 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=21650

--- Comment #2 from Steven Schveighoffer <schveiguy at gmail.com> ---
I don't think having both overloads would break any code. Types don't match
values, values don't match types.

parse(Target, Source, Flag!"doCount" doCount)(Source rng) will match existing
uses that specify the source range type explicitly

parse(Target, Flag!"doCount" doCount, Source)(Source rng) will match new uses
that want to use IFTI to detect the Source range type.

What was discussed in that thread is inserting the flag in *existing*
functions. I'm talking about adding overloads to address the new usage.

--


More information about the Digitalmars-d-bugs mailing list