Do I have a typo (or some other misunderstanding) or is there no support for
iterators with RepeatedPtrFields ? Iterators are only available in
RepeatedFields ?

google::protobuf::RepeatedPtrField<std::string>&::iterator it =
message->locations().begin()

Gave me a compilation error that there was no iterator in the global
namespace. Looking at the docs for RepeatedPtrField it doesn't mention
iterators, and RepeatedPtrField doesn't seem to inherit from RepeatedField -
the docs suggest the two objects are similar (but doesn't mention any
inheritance either).

Iterating using locations().Get(index) works fine as a workaround but I was
wondering if the lack of iterators was a conscious thing ?

Andrew 8-)

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to