Re: ambiguous definition

2014-04-13 Thread Andrej Mitrovic

On Monday, 10 March 2014 at 22:45:36 UTC, Pasqui23 wrote:

Hi.
I was editing std.string,but when I tried to compile it it game
me this error:


One of the errors in git-head is:
test.d(553): Error: undefined identifier S

Check your constraints, isSomeString!S should have been 
isSomeString!S1 or isSomeString!S2.


ambiguous definition

2014-03-10 Thread Pasqui23

Hi.
I was editing std.string,but when I tried to compile it it game
me this error:

string.d(368): Error: template std.string.indexOf cannot deduce
function from argument types !()(string, dchar), candidates are:
string.d(306):std.string.indexOf(S)(S s, ElementType!S c,
CaseSensitive cs = CaseSensitive.yes) if (isSomeString!S ||
isInputRange!S && isSomeChar!(ElementType!S))
string.d(404):std.string.indexOf(S)(S s, ElementType!S c,
const size_t startIdx, CaseSensitive cs = CaseSensitive.yes) if
(isSomeString!S || isInputRange!S && isSomeChar!(ElementType!S))
string.d(468):std.string.indexOf(S1, S2)(S1 s, S2 sub,
CaseSensitive cs = CaseSensitive.yes) if
(is(Unqual!(ElementType!S1) == Unqual!(ElementType!S2)) &&
(isSomeString!S1 || isSomeChar!(ElementType!S1) &&
isForwardRange!S1 && isForwardRange!S2))
string.d(551):std.string.indexOf(S1, S2)(S1 s, S2 sub,
const size_t startIdx, CaseSensitive cs = CaseSensitive.yes) if
(isSomeString!S || isForwardRange!S1 && isForwardRange!S2 &&
isSomeChar!(ElementType!S1))
string.d(369): Error: template std.string.indexOf cannot deduce
function from argument types !()(string, dchar), candidates are:
string.d(306):std.string.indexOf(S)(S s, ElementType!S c,
CaseSensitive cs = CaseSensitive.yes) if (isSomeString!S ||
isInputRange!S && isSomeChar!(ElementType!S))
string.d(404):std.string.indexOf(S)(S s, ElementType!S c,
const size_t startIdx, CaseSensitive cs = CaseSensitive.yes) if
(isSomeString!S || isInputRange!S && isSomeChar!(ElementType!S))
string.d(468):std.string.indexOf(S1, S2)(S1 s, S2 sub,
CaseSensitive cs = CaseSensitive.yes) if
(is(Unqual!(ElementType!S1) == Unqual!(ElementType!S2)) &&
(isSomeString!S1 || isSomeChar!(ElementType!S1) &&
isForwardRange!S1 && isForwardRange!S2))
string.d(551):std.string.indexOf(S1, S2)(S1 s, S2 sub,
const size_t startIdx, CaseSensitive cs = CaseSensitive.yes) if
(isSomeString!S || isForwardRange!S1 && isForwardRange!S2 &&
isSomeChar!(ElementType!S1))
string.d(370): Error: template std.string.indexOf cannot deduce
function from argument types !()(string, dchar), candidates are:
string.d(306):std.string.indexOf(S)(S s, ElementType!S c,
CaseSensitive cs = CaseSensitive.yes) if (isSomeString!S ||
isInputRange!S && isSomeChar!(ElementType!S))
string.d(404):std.string.indexOf(S)(S s, ElementType!S c,
const size_t startIdx, CaseSensitive cs = CaseSensitive.yes) if
(isSomeString!S || isInputRange!S && isSomeChar!(ElementType!S))
string.d(468):std.string.indexOf(S1, S2)(S1 s, S2 sub,
CaseSensitive cs = CaseSensitive.yes) if
(is(Unqual!(ElementType!S1) == Unqual!(ElementType!S2)) &&
(isSomeString!S1 || isSomeChar!(ElementType!S1) &&
isForwardRange!S1 && isForwardRange!S2))
string.d(551):std.string.indexOf(S1, S2)(S1 s, S2 sub,
const size_t startIdx, CaseSensitive cs = CaseSensitive.yes) if
(isSomeString!S || isForwardRange!S1 && isForwardRange!S2 &&
isSomeChar!(ElementType!S1))
string.d(371): Error: template std.string.indexOf cannot deduce
function from argument types !()(string, dchar), candidates are:
string.d(306):std.string.indexOf(S)(S s, ElementType!S c,
CaseSensitive cs = CaseSensitive.yes) if (isSomeString!S ||
isInputRange!S && isSomeChar!(ElementType!S))
string.d(404):std.string.indexOf(S)(S s, ElementType!S c,
const size_t startIdx, CaseSensitive cs = CaseSensitive.yes) if
(isSomeString!S || isInputRange!S && isSomeChar!(ElementType!S))
string.d(468):std.string.indexOf(S1, S2)(S1 s, S2 sub,
CaseSensitive cs = CaseSensitive.yes) if
(is(Unqual!(ElementType!S1) == Unqual!(ElementType!S2)) &&
(isSomeString!S1 || isSomeChar!(ElementType!S1) &&
isForwardRange!S1 && isForwardRange!S2))
string.d(551):std.string.indexOf(S1, S2)(S1 s, S2 sub,
const size_t startIdx, CaseSensitive cs = CaseSensitive.yes) if
(isSomeString!S || isForwardRange!S1 && isForwardRange!S2 &&
isSomeChar!(ElementType!S1))
string.d(553): Error: undefined identifier S
string.d(373): Error: template std.string.indexOf cannot deduce
function from argument types !()(string, dchar, CaseSensitive),
candidates are:
string.d(306):std.string.indexOf(S)(S s, ElementType!S c,
CaseSensitive cs = CaseSensitive.yes) if (isSomeString!S ||
isInputRange!S && isSomeChar!(ElementType!S))
string.d(404):std.string.indexOf(S)(S s, ElementType!S c,
const size_t startIdx, CaseSensitive cs = CaseSensitive.yes) if
(isSomeString!S || isInputRange!S && isSomeChar!(ElementType!S))
string.d(468):std.string.indexOf(S1, S2)(S1 s, S2 sub,
CaseSensitive cs = CaseSensitive.yes) if
(is(Unqual!(ElementType!S1) == Unqual!(ElementType!S2)) &&
(isSomeString!S1 || isSomeChar!(ElementType!S1) &&
isForwardRange!S1 && isForwardRange!S2))
string.d(551):std.string.indexOf(S1, S2)(S1 s, S2 sub,
const size_t startIdx, CaseSensitive cs = CaseSensitive.yes) if
(isSomeString!S || isForwardRange!S1 && isForwardRange!S2 &&
isSomeChar!(ElementType!S1))
string.d(553):