I think your best bet is to construct an std::string from the iterator range, and then parse from that. STL-style iterators are awkward because they achieve polymorphism via templates. In order for the protobuf parser to be able to use arbitrary iterators directly, the whole parser would have to be an enormous template. This would be impractical for a lot of reasons.
On Mon, Nov 15, 2010 at 1:30 PM, idleman <evoo...@gmail.com> wrote: > Hello everyone, > > I am just wondering if it should be possible to parse from a iterator > range? Say something like this: > > template <typename FowardIterator> > bool ParseFromRange(ForwardIterator, ForwordIterator); > > Is it possible? Could it easily be implemented? > > > Thanks in advance! > > -- > You received this message because you are subscribed to the Google Groups > "Protocol Buffers" group. > To post to this group, send email to proto...@googlegroups.com. > To unsubscribe from this group, send email to > protobuf+unsubscr...@googlegroups.com<protobuf%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/protobuf?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.