[LLVMbugs] [Bug 19085] Can't std::sort a collection of std::pair if one pair element is const

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Mar 8 16:42:59 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=19085

David Blaikie <dblaikie at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dblaikie at gmail.com
         Resolution|---                         |INVALID

--- Comment #1 from David Blaikie <dblaikie at gmail.com> ---
25.4.1.1/2 (the requirements for std::sort) states:

RandomAccessIterator shall satisfy the requirements of ValueSwappable
(17.6.3.2). The type of *first shall satisfy the requirements of
MoveConstructible (Table 20) and of MoveAssignable (Table 22).

A pair with a const member does not meet that last requirement
(MoveAssignable).

-- 
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/20140309/b4697e17/attachment.html>


More information about the llvm-bugs mailing list