Home » U++ Library support » U++ Core » Bug with FindMatch(const Range& r, const C& match, int from = 0)
Bug with FindMatch(const Range& r, const C& match, int from = 0) [message #49407] |
Tue, 06 February 2018 05:00 |
Novo
Messages: 1358 Registered: December 2006
|
Ultimate Contributor |
|
|
This method should look like below.
template <class Range, class C>
int FindMatch(const Range& r, const C& match, int from = 0)
{
for(int i = from; i < r.GetCount(); i++)
if(match(r[i])) return i;
return -1;
}
Template parameter class V is redundant. It doesn't allow to deduct types from arguments.
Regards,
Novo
|
|
|
|
|
Bug with FindMatch(const Range& r, const C& match, int from = 0)
By: Novo on Tue, 06 February 2018 05:00
|
|
|
Re: Bug with FindMatch(const Range& r, const C& match, int from = 0)
By: mirek on Tue, 06 February 2018 09:37
|
|
|
Re: Bug with FindMatch(const Range& r, const C& match, int from = 0)
By: Novo on Tue, 06 February 2018 16:31
|
|
|
Re: Bug with FindMatch(const Range& r, const C& match, int from = 0)
By: mirek on Tue, 06 February 2018 17:17
|
Goto Forum:
Current Time: Sun Apr 28 14:20:34 CEST 2024
Total time taken to generate the page: 0.04238 seconds
|