Record Detail

Compile Error

In file included from /in/Map.h:19:0,
                 from /in/Compile/Map_compile_check.cpp:5:
/in/BinarySearchTree.h: In instantiation of 'static BinarySearchTree<T, Compare>::Node* BinarySearchTree<T, Compare>::min_greater_than_impl(BinarySearchTree<T, Compare>::Node*, const T&, Compare) [with T = std::pair<std::__cxx11::basic_string<char>, int>; Compare = Map<std::__cxx11::basic_string<char>, int>::PairComp]':
/in/BinarySearchTree.h:213:45:   required from 'BinarySearchTree<T, Compare>::Iterator& BinarySearchTree<T, Compare>::Iterator::operator++() [with T = std::pair<std::__cxx11::basic_string<char>, int>; Compare = Map<std::__cxx11::basic_string<char>, int>::PairComp]'
/in/Compile/Map_compile_check.cpp:98:7:   required from here
/in/BinarySearchTree.h:628:13: error: no match for call to '(Map<std::__cxx11::basic_string<char>, int>::PairComp) (const std::pair<std::__cxx11::basic_string<char>, int>&, std::pair<std::__cxx11::basic_string<char>, int>&)'
     if (less(val,node->datum)) // val is less than current datum.
         ~~~~^~~~~~~~~~~~~~~~~
/in/BinarySearchTree.h: In instantiation of 'static BinarySearchTree<T, Compare>::Node* BinarySearchTree<T, Compare>::min_greater_than_impl(BinarySearchTree<T, Compare>::Node*, const T&, Compare) [with T = std::pair<Duck, std::__cxx11::basic_string<char> >; Compare = Map<Duck, std::__cxx11::basic_string<char>, DuckWealthLess>::PairComp]':
/in/BinarySearchTree.h:213:45:   required from 'BinarySearchTree<T, Compare>::Iterator& BinarySearchTree<T, Compare>::Iterator::operator++() [with T = std::pair<Duck, std::__cxx11::basic_string<char> >; Compare = Map<Duck, std::__cxx11::basic_string<char>, DuckWealthLess>::PairComp]'
/in/Compile/Map_compile_check.cpp:99:7:   required from here
/in/BinarySearchTree.h:628:13: error: no match for call to '(Map<Duck, std::__cxx11::basic_string<char>, DuckWealthLess>::PairComp) (const std::pair<Duck, std::__cxx11::basic_string<char> >&, std::pair<Duck, std::__cxx11::basic_string<char> >&)'
/in/BinarySearchTree.h: In static member function 'static BinarySearchTree<T, Compare>::Node* BinarySearchTree<T, Compare>::min_greater_than_impl(BinarySearchTree<T, Compare>::Node*, const T&, Compare) [with T = std::pair<std::__cxx11::basic_string<char>, int>; Compare = Map<std::__cxx11::basic_string<char>, int>::PairComp]':
/in/BinarySearchTree.h:644:3: error: control reaches end of non-void function [-Werror=return-type]
   }
   ^
/in/BinarySearchTree.h: In static member function 'static BinarySearchTree<T, Compare>::Node* BinarySearchTree<T, Compare>::min_greater_than_impl(BinarySearchTree<T, Compare>::Node*, const T&, Compare) [with T = std::pair<Duck, std::__cxx11::basic_string<char> >; Compare = Map<Duck, std::__cxx11::basic_string<char>, DuckWealthLess>::PairComp]':
/in/BinarySearchTree.h:644:3: error: control reaches end of non-void function [-Werror=return-type]
   }
   ^
cc1plus: all warnings being treated as errors
/in/Compile/Makefile:32: recipe for target 'Map_compile_check.exe' failed
make: *** [Map_compile_check.exe] Error 1

Information

Submit By
Type
Submission
Homework
Project 5
Language
C++
Submit At
2024-07-02 16:25:16
Judged At
2024-07-02 16:25:16
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes