Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@HenryRLee
Copy link
Contributor

Introduced a new VectorReverseIterator type. We cannot directly use
std::reverse_iterator<VectorIterator> because the signature of
operator* and operator-> in the VectorIterator class are not
standard signatures.

Also added rbegin(), rend(), cbegin(), cend(), crbegin()
and crend() in the Vector class.

Thank you for submitting a PR!

Please make sure you include the names of the affected language(s) in your PR title.
This helps us get the correct maintainers to look at your issue.

If you make changes to any of the code generators, be sure to run
cd tests && sh generate_code.sh (or equivalent .bat) and include the generated
code changes in the PR. This allows us to better see the effect of the PR.

If your PR includes C++ code, please adhere to the Google C++ Style Guide,
and don't forget we try to support older compilers (e.g. VS2010, GCC 4.6.3),
so only some C++11 support is available.

Include other details as appropriate.

Thanks!

@HenryRLee HenryRLee changed the title Support reverse iterator in Vector [C++]Support reverse iterator in Vector Jan 17, 2019
Introduced a new VectorReverseIterator type. We cannot directly use
`std::reverse_iterator<VectorIterator>` because the signature of
`operator*` and `operator->` in the VectorIterator class are not
standard signatures.

Also added `rbegin()`, `rend()`, `cbegin()`, `cend()`, `crbegin()`
and `crend()` in the Vector class.
@aardappel
Copy link
Collaborator

Thanks!

@aardappel aardappel merged commit c2f40c3 into google:master Jan 24, 2019
zchee pushed a commit to zchee/flatbuffers that referenced this pull request Feb 14, 2019
* Add `const` keyword to the `operator-(const uoffset_t &)` function in
`VectorIterator`

* Support reverse iterator in Vector

Introduced a new VectorReverseIterator type. We cannot directly use
`std::reverse_iterator<VectorIterator>` because the signature of
`operator*` and `operator->` in the VectorIterator class are not
standard signatures.

Also added `rbegin()`, `rend()`, `cbegin()`, `cend()`, `crbegin()`
and `crend()` in the Vector class.
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

Successfully merging this pull request may close these issues.

2 participants