fork download
  1. heap.cpp: In instantiation of ‘void Heap<T, C>::shiftDown(size_t) [with T = int; C = std::less<int>; size_t = long unsigned int]’:
  2. heap.cpp:15:4: required from ‘void Heap<T, C>::build_heap() [with T = int; C = std::less<int>]’
  3. heap.cpp:10:3: required from ‘Heap<T, C>::Heap(std::vector<_Tp>*) [with T = int; C = std::less<int>]’
  4. heap.cpp:49:34: required from here
  5. heap.cpp:32:9: error: no matching function for call to ‘std::less<int>::less(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)’
  6. 32 | if( C(heap->at(child+1),heap->at(child)) ){
  7. | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  8. In file included from /usr/include/c++/9/string:48,
  9. from /usr/include/c++/9/bits/locale_classes.h:40,
  10. from /usr/include/c++/9/bits/ios_base.h:41,
  11. from /usr/include/c++/9/ios:42,
  12. from /usr/include/c++/9/istream:38,
  13. from /usr/include/c++/9/sstream:38,
  14. from /usr/include/c++/9/complex:45,
  15. from /usr/include/c++/9/ccomplex:39,
  16. from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
  17. from heap.cpp:1:
  18. /usr/include/c++/9/bits/stl_function.h:381:12: note: candidate: ‘constexpr std::less<int>::less()’
  19. 381 | struct less : public binary_function<_Tp, _Tp, bool>
  20. | ^~~~
  21. /usr/include/c++/9/bits/stl_function.h:381:12: note: candidate expects 0 arguments, 2 provided
  22. /usr/include/c++/9/bits/stl_function.h:381:12: note: candidate: ‘constexpr std::less<int>::less(const std::less<int>&)’
  23. /usr/include/c++/9/bits/stl_function.h:381:12: note: candidate expects 1 argument, 2 provided
  24. /usr/include/c++/9/bits/stl_function.h:381:12: note: candidate: ‘constexpr std::less<int>::less(std::less<int>&&)’
  25. /usr/include/c++/9/bits/stl_function.h:381:12: note: candidate expects 1 argument, 2 provided
  26. heap.cpp:36:8: error: no matching function for call to ‘std::less<int>::less(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)’
  27. 36 | if( C(heap->at(child), heap->at(i)) ){
  28. | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  29. In file included from /usr/include/c++/9/string:48,
  30. from /usr/include/c++/9/bits/locale_classes.h:40,
  31. from /usr/include/c++/9/bits/ios_base.h:41,
  32. from /usr/include/c++/9/ios:42,
  33. from /usr/include/c++/9/istream:38,
  34. from /usr/include/c++/9/sstream:38,
  35. from /usr/include/c++/9/complex:45,
  36. from /usr/include/c++/9/ccomplex:39,
  37. from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
  38. from heap.cpp:1:
  39. /usr/include/c++/9/bits/stl_function.h:381:12: note: candidate: ‘constexpr std::less<int>::less()’
  40. 381 | struct less : public binary_function<_Tp, _Tp, bool>
  41. | ^~~~
  42. /usr/include/c++/9/bits/stl_function.h:381:12: note: candidate expects 0 arguments, 2 provided
  43. /usr/include/c++/9/bits/stl_function.h:381:12: note: candidate: ‘constexpr std::less<int>::less(const std::less<int>&)’
  44. /usr/include/c++/9/bits/stl_function.h:381:12: note: candidate expects 1 argument, 2 provided
  45. /usr/include/c++/9/bits/stl_function.h:381:12: note: candidate: ‘constexpr std::less<int>::less(std::less<int>&&)’
  46. /usr/include/c++/9/bits/stl_function.h:381:12: note: candidate expects 1 argument, 2 provided
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty