Trying to compile sample from The D Programming Language book.

Junior jeezusjr at gmail.com
Sun Apr 3 00:10:29 PDT 2011


Hello, I am completely stuck on this error, any help would be appreciated...
google was not helpful (too many useless matches for "D <error>").

I am trying to compile this:

import std.string, std.algorithm, std.conv, std.ctype, std.regex, std.range,
std.stdio;
// blah blah blah
auto words = split(sentence, regex("[ \t,.;:?]+"));
// blah blah blah


and two compilers (gdc, dmd) are giving me this error (output from gdc):

main.d:34: Error: std.string.split at
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../include/d2/4.5.1/std/string.d:69
conflicts with std.regex.split(String) at
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../include/d2/4.5.1/std/regex.d:3096


And I am clueless. How can they conflict, it's the standard library. It must
be in the usage of split. As this is the second or third example in chapter
one, I have no clue what is going on.

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20110403/d74cd068/attachment.html>


More information about the Digitalmars-d-learn mailing list