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: 1430 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: Fri Jun 13 18:36:10 CEST 2025
Total time taken to generate the page: 0.04311 seconds
|