Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
Novo is currently offline  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
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Core/SSL crashes at exit on Linux.
Next Topic: Problem with websocket connect method
Goto Forum:
  


Current Time: Fri Mar 29 06:00:23 CET 2024

Total time taken to generate the page: 0.01465 seconds