You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to std-pr...@isocpp.org
On 2014–04–11, at 3:22 PM, Jeaye Wilkerson <con...@jeaye.com> wrote:
The new second parameter (optional) for the istream_iterator constructor represents a collection of all delimiter chars. This would default to all whitespace characters.
Defaulting to all whitespace characters would mean that istream_iterator<string> would by default return only a single string before quitting. Making the argument optional would break all existing istream_iterator<string> code.
istream_iterator is not really suitable for parsing because it doesn’t have state besides the single character of putback guaranteed by streambuf.
Such a proposal might have a better chance with an implementation. You could probably achieve this by inheriting from istream_iterator. Perhaps even build a real parser around it too. It’s up to you though.