www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - regexp conflicts with string

reply sailormo tpts6.seed.net.tw writes:
Hello:

C:\dmd\bin\..\src\phobos\std\regexp.d(246): function std.regexp.find conflicts w
ith std.string.find at C:\dmd\bin\..\src\phobos\std\string.d(272)

Why?? why these two standard libraries would conflict with each other??
And how to solve it??

Thanks ^_^

And by the way, "template instance cannot resolve forward reference" what does
the message mean?? I use -v to compile, and it seems fine in semantic1 and 2,
but it fails in semantic3. 
May 08 2006
next sibling parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
<sailormo tpts6.seed.net.tw> wrote in message 
news:e3npqn$1bf5$1 digitaldaemon.com...
 C:\dmd\bin\..\src\phobos\std\regexp.d(246): function std.regexp.find 
 conflicts w
 ith std.string.find at C:\dmd\bin\..\src\phobos\std\string.d(272)

 Why?? why these two standard libraries would conflict with each other??
 And how to solve it??

I don't know, and to solve it, just use the full name (i.e. std.regexp.find or std.string.find). This pisses me off when using std.ctype and std.stream at the same time as well, as they have a couple of conflicting names.
May 08 2006
prev sibling parent Hasan Aljudy <hasan.aljudy gmail.com> writes:
sailormo tpts6.seed.net.tw wrote:
 Hello:
 
 C:\dmd\bin\..\src\phobos\std\regexp.d(246): function std.regexp.find conflicts
w
 ith std.string.find at C:\dmd\bin\..\src\phobos\std\string.d(272)
 
 Why?? why these two standard libraries would conflict with each other??
 And how to solve it??

use full qualified name, i.e. std.regexp.find and std.string.find you can set aliases too, for example: alias std.string.find sfind; alias std.regexp.find xfind; and then you can just call sfind instead of std.string.find
 
 Thanks ^_^
 
 And by the way, "template instance cannot resolve forward reference" what does
 the message mean?? I use -v to compile, and it seems fine in semantic1 and 2,
 but it fails in semantic3. 
 
 
 

May 08 2006