Range functions expand char to dchar
anonymous via Digitalmars-d
digitalmars-d at puremagic.com
Tue Sep 8 11:37:01 PDT 2015
On Tuesday 08 September 2015 20:28, Matt Kline wrote:
> If we have a range of char elements, won't that do? regex() uses
> the standard isSomeString!S constraint to take any range of chars.
isSomeString!S doesn't check if S is a range. It checks if S is "some
string", meaning: "Char[], where Char is any of char, wchar or dchar, with
or without qualifiers".
http://dlang.org/phobos/std_traits.html#isSomeString
Checking for ranges would be done with isInputRange, isForwardRange, etc.
http://dlang.org/phobos/std_range_primitives.html
More information about the Digitalmars-d
mailing list