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

    <tr>
        <th>Summary</th>
        <td>
            libc++ std::reverse_iterator does not appear to correctly inherit or invoke iterator-based constructor
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    Clang is reporting it is unable to resolve a call to std::reverse_iterator(plf::hive<int *>::iterator), where hive overloads the class declaration to specialize for the hive iterator/reverse_iterator. 
Again with the latest version of plf::hive and it's test suite [here](https://github.com/mattreecebentley/plf_hive),
output via godbolt [here](https://godbolt.org/z/ee4cbEK8h) (consteval functions changed to constexpr to avoid related other non-related errors).

I am unclear what the issue is exactly here, but it is either a libc++ interaction or a clang interaction, and it appears to be something to do with either (a) std::reverse_iterator not inheriting the iterator-based constructor from hive::reverse_iterator, or (b) not matching to std::reverse_iterator overload at the bottom of plf_hive.h, line 4514.

The staggered errors as it tries to resolve follow:
1. no matching conversion for functional-style cast from 'plf::hive<int *>::hive_iterator<false>' to 'reverse_iterator<plf::hive<int *>::hive_iterator<false>>'
2. candidate constructor (the implicit copy constructor) not viable: no known conversion from 'plf::hive<int *>::hive_iterator<false>' to 'const std::reverse_iterator<plf::hive<int *>::hive_iterator<false>>' for 1st argument
3. candidate constructor (the implicit move constructor) not viable: no known conversion from 'plf::hive<int *>::hive_iterator<false>' to 'std::reverse_iterator<plf::hive<int *>::hive_iterator<false>>' for 1st argument
4.  candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 1 was provided

If it is an error on my part, again it would be good to know what it is, as GCC11 and MSVC 2022 work fine with this code.
Thanks again-
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzFVkuP2zYQ_jXyZWBBL3u9Bx82TrYoip5a9BpQ5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