little explanation needed

Can someone, please, explain what these lines of code do?
1
2
3
4
5
string slurp(fstream& in) 
{
	std::string content((std::istreambuf_iterator<char>(in)),
		(std::istreambuf_iterator<char>()));
	return content;
Looks like it takes a file stream, puts the contents into a string, and then returns the string.
Take a look at all of the std::string constructor overloads:
http://www.cplusplus.com/reference/string/string/string/

Thank you guys. Really appreciate it.
Topic archived. No new replies allowed.