-
Notifications
You must be signed in to change notification settings - Fork 150
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
struct std::iterator’ is deprecated in segbits_file_reader.h:38 #2127
Comments
This error message indicates that the code is using the std::iterator class, which has been marked as deprecated in the C++17 standard. The deprecated warning is being treated as an error, which is causing the compilation to fail. A quick fix would be to remove the For a better long-term solution, the code needs to updated to use replacements for deprecated features. |
PR for this issue. |
Met the same issue still, but was able to work around it by fixing the c++ version to 14, in the Cmakelists.txt file, by adding set(CMAKE_CXX_STANDARD 14) |
When compiling with cmake 3.25.1 I get this error:
/home/xyz/prjxray/lib/include/prjxray/segbits_file_reader.h:38:27: error: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Werror=deprecated-declarations]
38 | : public std::iterator<std::input_iterator_tag, value_type> {
| ^~~~~~~~
In file included from /usr/include/c++/12/bits/stl_algobase.h:65,
from /usr/include/c++/12/memory:63,
from /home/xyz/prjxray/lib/include/prjxray/database.h:13:
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
cc1plus: all warnings being treated as errors
make[3]: *** [lib/CMakeFiles/libprjxray.dir/build.make:76: lib/CMakeFiles/libprjxray.dir/database.cc.o] Error 1
The text was updated successfully, but these errors were encountered: