[llvm-bugs] [Bug 40698] std::max_element causes an invalid static assert error in algorithm:2505:5: error: static_assert failed due to requirement '__is_forward_iterator<Iterator>::value' "std::max_element requires a ForwardIterator"

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Feb 12 01:12:52 PST 2019


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

Eric Fiselier <eric at efcs.ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |eric at efcs.ca
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Eric Fiselier <eric at efcs.ca> ---
`std::iterator` is a private base class in your example. Making it public fixes
the code.

https://godbolt.org/z/AeYW_q

-- 
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/20190212/12bdcf70/attachment.html>


More information about the llvm-bugs mailing list