I found this answer on stack overflow for reading a stream into a string. The code std::string s(std::istreambuf_iterator<char>(stream), {}); works just fine for what I was doing, but I was really confused about the {}. As far as I can tell this is using the std::string constructor that uses a begin and end iterator, but I've never seen an iterator defined with {}. What does that mean and how is it achieving the same thing as std::istreambuf_iterator<char> eos;?