D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6860 - isNumeric(immutable(char)) fails
Summary: isNumeric(immutable(char)) fails
Status: RESOLVED INVALID
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86 Windows
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-28 03:06 UTC by Vladimir Panteleev
Modified: 2014-02-12 13:16 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Vladimir Panteleev 2011-10-28 03:06:45 UTC
import std.string;

void main()
{
	string five = "5";
	assert(isNumeric(five[0]));
}
Comment 1 SomeDude 2012-05-01 15:46:16 UTC
2.059

PS E:\DigitalMars\dmd2\samples> rdmd  bug
E:\DigitalMars\dmd2\windows\bin\..\..\src\phobos\std\traits.d(3233): Error: template std.traits.isNumeric(T) is not a function template
bug.d(8): Error: function std.string.isNumeric is deprecated
Comment 2 Vladimir Panteleev 2012-05-01 15:49:41 UTC
Still reproducible with -d.

I guess this bug should be closed when the deprecated variants are removed.
Comment 3 Peter Alexander 2014-02-12 13:16:51 UTC
(In reply to comment #2)
> Still reproducible with -d.
> 
> I guess this bug should be closed when the deprecated variants are removed.

Looks like that is the case now. The only isNumeric in std.string is a version that takes a string, not a char.