[llvm-bugs] [Bug 39617] New: 'pointer_iterator' doesn't forward 'iterator_category' to 'iterator_adaptor_base'

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Nov 10 02:57:23 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=39617

            Bug ID: 39617
           Summary: 'pointer_iterator' doesn't forward 'iterator_category'
                    to 'iterator_adaptor_base'
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Core LLVM classes
          Assignee: unassignedbugs at nondot.org
          Reporter: ecstaticmorse at gmail.com
                CC: llvm-bugs at lists.llvm.org

`pointer_iterator` inherits from `iterator_adaptor_base` but doesn't pass the
underlying iterator's category, so its value type will always be defaulted and
its category will often be incorrect.

The incorrect code is here:

https://github.com/llvm-mirror/llvm/blob/10c84a8f35cae4a9fc421648d9608fccda3925f2/include/llvm/ADT/iterator.h#L312

For comparison, `pointee_iterator` correctly  instantiates its base class here:
https://github.com/llvm-mirror/llvm/blob/10c84a8f35cae4a9fc421648d9608fccda3925f2/include/llvm/ADT/iterator.h#L288

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181110/cf459be8/attachment.html>


More information about the llvm-bugs mailing list