Iterator related warnings in visual studio build
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
Research direction
Start with src/wasm-type.h at the iterator definitions named in the Visual Studio warnings, then reproduce the build to identify the remaining iterator-related warnings. Review the affected iterator declarations and verify that the Visual Studio build no longer reports these C++17 deprecation warnings.
Written by the indexing model from the issue text.
Description
2>C:\src\binaryen\src\wasm-type.h(221,26): warning C4996: 'std::iterator<std::random_access_iterator_tag,wasm::Type,long,wasm::Type *,const wasm::Type &>': warning STL4015: The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17. (The <iterator> 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. (compiling source file C:\src\binaryen\src\asmjs\asm_v_wasm.cpp)
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\xutility(6006,54): message : see declaration of 'std::iterator' (compiling source file C:\src\binaryen\src\asmjs\asm_v_wasm.cpp)
2>C:\src\binaryen\src\wasm-type.h(251,26): warning C4996: 'std::iterator<std::random_access_iterator_tag,wasm::Type,long,wasm::Type *,const wasm::Type &>::difference_type': warning STL4015: The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17. (The <iterator> 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. (compiling source file C:\src\binaryen\src\asmjs\asm_v_wasm.cpp)
2>C:\src\binaryen\src\wasm-type.h(255,24): warning C4996: 'std::iterator<std::random_access_iterator_tag,wasm::Type,long,wasm::Type *,const wasm::Type &>::difference_type': warning STL4015: The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17. (The <iterator> 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. (compiling source file C:\src\binaryen\src\asmjs\asm_v_wasm.cpp)
2>C:\src\binaryen\src\wasm-type.h(258,26): warning C4996: 'std::iterator<std::random_access_iterator_tag,wasm::Type,long,wasm::Type *,const wasm::Type &>::difference_type': warning STL4015: The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17. (The <iterator> 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. (compiling source file C:\src\binaryen\src\asmjs\asm_v_wasm.cpp)
2>C:\src\binaryen\src\wasm-type.h(262,24): warning C4996: 'std::iterator<std::random_access_iterator_tag,wasm::Type,long,wasm::Type *,const wasm::Type &>::difference_type': warning STL4015: The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17. (The <iterator> 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. (compiling source file C:\src\binaryen\src\asmjs\asm_v_wasm.cpp)
2>C:\src\binaryen\src\wasm-type.h(265,5): warning C4996: 'std::iterator<std::random_access_iterator_tag,wasm::Type,long,wasm::Type *,const wasm::Type &>::difference_type': warning STL4015: The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17. (The <iterator> 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. (compiling source file C:\src\binaryen\src\asmjs\asm_v_wasm.cpp)
2>C:\src\binaryen\src\wasm-type.h(269,5): warning C4996: 'std::iterator<std::random_access_iterator_tag,wasm::Type,long,wasm::Type *,const wasm::Type &>::value_type': warning STL4015: The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17. (The <iterator> 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. (compiling source file C:\src\binaryen\src\asmjs\asm_v_wasm.cpp)
And many more. Last modified here https://github.com/WebAssembly/binaryen/commit/9752196fd1357fbc129d1e4f53e8eb22cd6219f9 but it doesn't seem like the problem was introduced there.
- Dominant language
- WebAssembly
- Stars
- 8.6k
- Forks
- 885
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 70
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from WebAssembly/binaryen
-
Difficulty 2/5 Half a day Newbie friendliness 76/100
WebAssembly/binaryen#9018 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
WebAssembly/binaryen#9123 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
WebAssembly/binaryen#9122 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
WebAssembly/binaryen#9086 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
WebAssembly/binaryen#9038 · 5 comments ·
All issues in WebAssembly/binaryen
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
objectionary/jeo-maven-plugin#1774 ·
-
compiler/runtime
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
leanprover/lean4#15255 ·
-
bot-triaged module: correctness (silent) module: fx release triage triage review
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Grammar Gap: activated › effect clause › {self} deals damage equal to its power to target creature Openarea:mechanics ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
fil-donadoni/tolaria#4317 ·