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

error: 'rbegin' is not a member of 'std' - C++11 compliancy #23

Closed
knedlsepp opened this issue Apr 5, 2016 · 2 comments
Closed

error: 'rbegin' is not a member of 'std' - C++11 compliancy #23

knedlsepp opened this issue Apr 5, 2016 · 2 comments

Comments

@knedlsepp
Copy link

I am experiencing problems compiling with gcc-4.9.3. On trying to compile a simple zip, I get the following error message:

cppitertools/reversed.hpp:29:16: error: 'rbegin' is not a member of 'std'

It seems to me that this issue is due to cppitertools using C++14 features and my standard library not being C++14 compliant, as is explained here.
Should the library still work in a C++11 environment or is there some other problem on my behalf?

Edit:
I now tested with gcc-5.3 and -std=c++11, which gives similar errors. Activating -std=c++14 fixes the problem.
The issue boils down to:

Implementation of python itertools and builtin iteration functions for C++14

@ryanhaining
Copy link
Owner

Yes I've been working on the C++14 branch for some time, but enough time has passed (imo) to stop active development on both C++11 and C++14. You are right that gcc-4.9 with its libstdc++ was missing std::rbegin and std::rend which are both new to C++14. They are supported as of the gcc-5 series.

If you can't use a library with the newer C++14 functions, you can comment out the code that uses it, or remove #include <reveresed.hpp> from itertools.hpp. As far as I recall reversed is the only one that uses them. Otherwise stick with v0.1 which is a less than ideal fix.

@knedlsepp
Copy link
Author

Ok. Thanks for the info.

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