[Issue 15526] provide a way to ignore underscores for parsing integers

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Jan 7 12:16:46 PST 2016


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

b2.temp at gmx.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |b2.temp at gmx.com

--- Comment #1 from b2.temp at gmx.com ---
(In reply to Steven Schveighoffer from comment #0)
> Liam McSherry created a PR to do this, but it was never fixed/accepted. Most
> of the discussion on this issue can be read in the PR comments here:
> https://github.com/D-Programming-Language/phobos/pull/3377

The `AllowUnderscores` parameter from the original PR should rather be a
template parameter. If someone wants to allow underscores, this is because he
strongly expects that the function will be used with underscores (which is not
so common with int literals).

That's stupid to create an additional "runtime branch" for such an option, so
maybe only as a template parameter.

--


More information about the Digitalmars-d-bugs mailing list