-
Notifications
You must be signed in to change notification settings - Fork 229
Inheriting std::iterator is deprecated in C++17 #101
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
Inheriting std::iterator is deprecated in C++17 #101
Conversation
463d2c2 to
50709e6
Compare
|
this should also fix https://svn.boost.org/trac10/ticket/13505 @ericniebler @Belcourt ping. |
|
@DanielaE please rebase and see #104 (comment) |
50709e6 to
2e07dad
Compare
|
Done 😄 |
| { // replace with iterator_adaptor implementation -JGS | ||
| typedef std::bidirectional_iterator_tag iterator_category; | ||
| typedef ArrayBinaryTreeNode value_type; | ||
| typedef size_type difference_type; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typedef ArrayBinaryTreeNode::difference_type difference_type;
typedef ArrayBinaryTreeNode* pointer;
would be more readable?
Boost's iterator.hpp is deprecated, too. Therefore get rid of all of that and replace inheritance by lifting std::iterator's members into the derived class. Signed-off-by: Daniela Engert <dani@ngrt.de>
2e07dad to
93cfa18
Compare
|
I'm helping out with the PR backlog. Looks like you have a code change. I need to look into how this will affect backwards compatibility with C++ standards. This is to let you know and help me prioritize PR's. |
|
It doesn't change it in any respect. |
|
It uses tags/traits, which are not something necessarily safe for C++03. I'm going to do some additional testing to satisfy myself that this is either a safe change, or going to be pushed off. |
|
Well, no - it does not. |
|
OK, I'm mixing up 2a/2z stuff with 03. |
|
Graph is one of the 5 last users of boost::iterator, the empty shell around std::iterator which itself is deprecated in C++17 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0174r2.html#2.1 (with all it's consequences) and about to be removed from the language. |
|
Ooops, that reference was to the wrong PR :( |
|
@jzmaddock Can you trigger a build on this? |
|
Closing and re-opening to trigger a CI build. |
|
Looks good to me, but I'll wait for Appveyor to catch up before merging... |
|
@jzmaddock All clear. |
Boost's iterator.hpp is deprecated, too. Therefore get rid of all of that and replace inheritance by lifting std::iterator's members into the derived class.
Signed-off-by: Daniela Engert dani@ngrt.de