std::ptr_fun explanation?

Here's a snippet of some code I have.

1
2
3
4
5
6
// Check if the line starts with //, the program then ignores it but
			// it does display it to console and results.txt
			// Also skips calculating blank lines
			if (find_if(buffer.begin(), buffer.end(), std::not1(std::ptr_fun< int, int > (std::isspace)) ) == buffer.end() ||
				(buffer.size() >= 2 && buffer[0] == '/' && buffer[1] == '/') )
				continue; // Make it jump back to the beginning 


I know std::ptr_fun makes an instance of std::isspace that works with std::not1, but I know how std::ptr_fun works with the arguments. I'm guessing the overloaded version of std::isspace with an argument of 2 ints is selected? Can someone clarify this function for me?
Last edited on
the isspace from cctype takes an int as parameter and returns an int. That's what the template arguments of ptr_fun are about
http://www.cplusplus.com/reference/std/functional/ptr_fun/
http://www.cplusplus.com/reference/clibrary/cctype/isspace/
http://www.cplusplus.com/reference/std/locale/isspace/
Topic archived. No new replies allowed.