<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/57005>57005</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [clang-pseudo] Forest.h - don't inherit from std::iterator
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          RKSimon
      </td>
    </tr>
</table>

<pre>
    Now that we've updated to C++17 MSVC gives very verbose warnings about not creating classes that inherit from std::iterator:
```
Building CXX object tools\clang\tools\extra\pseudo\tool\CMakeFiles\clang-pseudo.dir\HTMLForest.cpp.obj

E:\llvm\llvm-project\clang-tools-extra\pseudo\include\clang-pseudo/Forest.h(202): warning C4996: 'std::iterator<std::input_iterator_tag,const clang::pseudo::ForestNode,ptrdiff_t,const clang::pseudo::ForestNode *,const clang::pseudo::ForestNode &>': 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.
```
while MSVC does give us the option of silencing these warnings via _SILENCE_CXX17_RESULT_OF_DEPRECATION_WARNING or _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS, I'd much prefer to see these fixed properly.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVVFFz4jYQ_jXmZQePETjgBz8QB-4yJaQTaHtvHtlaY12N5EoyOf79rYwDaS-d9mY0lrXa3e_Tp9UWWpzTrX4FV3MHrxiw-QmhawV3KMBpyAJ2T2Myh6fd7xkc5AktnNCc_afQFuGVGyXVwQIvdOdAaQelQe7IBmXDraWAPrtUNRrpoDL6CNaJYLqkIR0a7rTxq-ghiJbBXTSMfnnfyUb4XNmXL6CLr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