enum string
Dmitry Olshansky
dmitry.olsh at gmail.com
Tue Aug 7 10:14:00 PDT 2012
On 07-Aug-12 21:05, Namespace wrote:
> [code]
> import std.regex;
>
> enum Token : string {
> Blank = r"\s+"
> }
>
> void main() {
> const string text = "Foo Bar";
>
> // text.split(regex(Token.Blank)); // don't work
>
> const string blank = Token.Blank;
> text.split(regex(blank)); // work
> }
> [/code]
>
> Can me somebody explain that? o.O
isSomeString!T regression? See enum & std.traits topic in d.D.
Seems like it will work again in 2.061...
--
Dmitry Olshansky
More information about the Digitalmars-d-learn
mailing list