[llvm-bugs] [Bug 43063] New: std::sort_heap use (possible deleted) operator,

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Aug 20 09:37:42 PDT 2019


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

            Bug ID: 43063
           Summary: std::sort_heap use (possible deleted) operator,
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: yichen.yan at inf.ethz.ch
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com

Created attachment 22402
  --> https://bugs.llvm.org/attachment.cgi?id=22402&action=edit
test.cc

Summary: std::sort_heap use (possible deleted) operator, and failed to compile
if it's deleted.



Steps to Reproduce: clang++ -o /dev/null -std=c++11 --compile test.cc
 (test.cc attched)



Actual Results:
In file included from test.cc:1:
/home/yiyan/.local/bin/../include/c++/v1/algorithm:4998:67: error: overload
resolution selected deleted operator ','
    for (difference_type __n = __last - __first; __n > 1; --__last, --__n)
                                                          ~~~~~~~~^ ~~~~~
/home/yiyan/.local/bin/../include/c++/v1/algorithm:5008:5: note: in
instantiation of function template specialization
'std::__1::__sort_heap<std::__1::__less<int, int> &,
random_access_iterator_wrapper<int> >' requested here
    __sort_heap<_Comp_ref>(__first, __last, __comp);
    ^
/home/yiyan/.local/bin/../include/c++/v1/algorithm:5016:12: note: in
instantiation of function template specialization
'std::__1::sort_heap<random_access_iterator_wrapper<int>, std::__1::__less<int,
int> >' requested here
    _VSTD::sort_heap(__first, __last, __less<typename
iterator_traits<_RandomAccessIterator>::value_type>());
           ^
test.cc:33:10: note: in instantiation of function template specialization
'std::__1::sort_heap<random_access_iterator_wrapper<int> >' requested here
    std::sort_heap(sortcon.begin(), sortcon.end());
         ^
test.cc:23:10: note: candidate function [with U = long] has been explicitly
deleted
    void operator,(U) = delete;
         ^
1 error generated.



Expected Results: No error



Build Date & Hardware: Build 2019-08-20 on Linux x86_64

-- 
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/20190820/97b34a3b/attachment.html>


More information about the llvm-bugs mailing list