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