Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

CollectionIterator does not fully satisfy iterator concept #150

Open
tmadlener opened this issue Nov 23, 2020 · 1 comment · May be fixed by #273 or #626
Open

CollectionIterator does not fully satisfy iterator concept #150

tmadlener opened this issue Nov 23, 2020 · 1 comment · May be fixed by #273 or #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.

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