[Issue 8231] conv.to fails to convert string with trailing "u"
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jun 17 15:21:57 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8231
John Colvin <john.loughran.colvin at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |john.loughran.colvin at gmail.
| |com
--- Comment #2 from John Colvin <john.loughran.colvin at gmail.com> 2013-06-17 23:21:56 BST ---
This is quite easily fixed with a little utility function that checks if the
remainder after parsing is a floating point or integer suffix.
However, it is potentially a nasty subtle breaking change as it's quite a
common pattern to rely on functions like "to" to check for unusual input, which
this would change the definition of. It also introduces a difference in
attitude between "to" and "parse", which currently work together very neatly.
On those grounds, I'm against it.
To be acceptable it would have to be enabled with a template argument (an enum
with names RAW and D_LITERAL_AWARE ?), or be in a function with a different
name.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list