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

Not sure: : should forward_iterator_tag not also inherit from truct output_iterator_tag ? #136

Open
F-Haferkorn opened this issue Jan 9, 2024 · 1 comment

Comments

@F-Haferkorn
Copy link

Hello at all,
reading https://en.cppreference.com/w/cpp/iterator/iterator_tags,
i wonder, the inheritance structure of should forward_iterator_tag is correct herein.

Is the forward_iterator_tag not also inherit from sruct output_iterator_tag ?

it says
struct forward_iterator_tag : public input_iterator_tag {}; // (4)

Were do I find a decise manual howto properly write my own iterators for my own classes.
Yours,
Frank.Haferkorn

@PeterFeicht
Copy link
Contributor

Not every forward iterator is writable, so no it should not.

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

No branches or pull requests

2 participants