use streambuf_iterator rather than string to pass string to ojsink