-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
STL4015: The std::iterator class template is deprecated in C++17 #6283
Comments
I carefully considered how to label your request to determine how the RealSense team track it. As others have not reported it as something that is breaking their builds, I have labelled it as "Enhancement" (a 'feature request'). This case will remain open so that it can be tracked. I hope that this is a satisfactory approach for you. |
There were no other reports from RealSense users of this problem occurring in the 2 months after this case was created. I will therefore close the case. |
Hey @MartyG-RealSense, would you mind re-opening this? My info is similar to @YHabotAetrex, I am using RealSense2 on Windows with a C++17 compiler (Visual Studio v142). I would also consider renaming this issue. The solution, for now, is to define |
@danilogr Ok, I will re-open it and take another look at it, as the details that you have kindly provided will be helpful for me to possibly file a bug report, given that it is a replicable problem (experienced by more than one RealSense user) and generates warnings. |
@danilogr , @MartyG-RealSense , I will re-classify this as enhancement request - the SDK is explicitly targeted to C++11 standard. |
Hi @YHabotAetrex and @danilogr The issue in this case has now been addressed with a Pull Request that has been merged into the RealSense SDK. I will therefore now close this case. Thanks very much for your reports! |
Issue Description
Getting a build error in :
\Intel RealSense SDK 2.0\include\librealsense2\hpp\rs_frame.hpp(1102,38): error C4996: 'std::iterator<std::forward_iterator_tag,rs2::frame,ptrdiff_t,rs2::frame *,rs2::frame &>': warning STL4015: The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17. (The header is NOT deprecated.) The C++ Standard has never required user-defined iterators to derive from std::iterator. To fix this warning, stop deriving from std::iterator and start providing publicly accessible typedefs named iterator_category, value_type, difference_type, pointer, and reference. Note that value_type is required to be non-const, even for constant iterators. You can define _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING or _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to acknowledge that you have received this warning.
The text was updated successfully, but these errors were encountered: