Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

CollectionIterator does not fully satisfy iterator concept #150

Closed
tmadlener opened this issue Nov 23, 2020 · 1 comment · Fixed by #626
Closed

CollectionIterator does not fully satisfy iterator concept #150

tmadlener opened this issue Nov 23, 2020 · 1 comment · Fixed by #626
Assignees

Comments

@tmadlener
Copy link
Collaborator

It currently seems to be impossible to use podio collections with the STL algorithms operating on iterator ranges, because the CollectionIterator does not provide enough information, leading the compiler complaining about (greatly abbreviated to the crucial line):

/usr/include/c++/9/bits/stl_iterator_base_types.h:205:5: error: no type named ‘iterator_category’ in ‘struct std::iterator_traits<edm4hep::MCRecoParticleAssociationCollectionIterator>’

I think having a correctly implemented const-iterator is something we should aim for, to at least enable the usage of STL algorithms that can be used on ranges of const-iterators.

@whit2333
Copy link

whit2333 commented Dec 1, 2020

IMO, this is critical. I have almost given up and started using the raw *Data classes which are not accessible otherwise.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
3 participants