https://llvm.org/bugs/show_bug.cgi?id=31168
Bug ID: 31168 Summary: Relational operators for std::experimental::optional<T> Product: libc++ Version: 3.9 Hardware: All OS: All Status: NEW Severity: normal Priority: P Component: All Bugs Assignee: unassignedclangb...@nondot.org Reporter: arthur.j.odw...@gmail.com CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com Classification: Unclassified Created attachment 17652 --> https://llvm.org/bugs/attachment.cgi?id=17652&action=edit Patch for optional<T> relational operators N4606 requires that optional<T>::operator> be implemented in terms of T::operator>, but right now libc++'s optional<T>::operator> is (incorrectly) implemented in terms of T::operator< with the operands flipped. This is important for types T that have only incomplete orderings: (x < y) may not imply (y > x). I've attached a patch that I think suffices to fix the issue, but I don't have commit privileges. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs