Record Detail

Compile Error

In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp: In instantiation of 'static bool KDTree<std::tuple<_Elements ...>, ValueType>::equal_helper(const std::pair<std::tuple<_Elements ...>, ValueType>&, const std::pair<std::tuple<_Elements ...>, ValueType>&) [with ValueType = std::__cxx11::basic_string<char>; KeyTypes = {int, int, int}]':
/in/kdtree.hpp:400:32:   required from 'KDTree<std::tuple<_Elements ...>, ValueType>::KDTree(std::vector<std::pair<std::tuple<_Elements ...>, ValueType> >) [with ValueType = std::__cxx11::basic_string<char>; KeyTypes = {int, int, int}]'
/in/driver/main.cpp:43:57:   required from here
/in/kdtree.hpp:367:44: error: no matching function for call to 'KDTree<std::tuple<int, int, int>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::compareKey<0, std::less<void> >(const std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&, const std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&)'
         return (!compareKey<0, std::less<>>(a, b) && !compareKey<0, std::greater<>>(a, b));
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/in/kdtree.hpp:202:17: note: candidate: template<long unsigned int DIM, class Compare> static bool KDTree<std::tuple<_Elements ...>, ValueType>::compareKey(const Key&, const Key&, Compare) [with long unsigned int DIM = DIM; Compare = Compare; ValueType = std::__cxx11::basic_string<char>; KeyTypes = {int, int, int}]
     static bool compareKey(const Key &a, const Key &b, Compare compare = Compare()) {
                 ^~~~~~~~~~
/in/kdtree.hpp:202:17: note:   template argument deduction/substitution failed:
/in/kdtree.hpp:367:44: note:   cannot convert 'a' (type 'const std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >') to type 'const Key& {aka const std::tuple<int, int, int>&}'
         return (!compareKey<0, std::less<>>(a, b) && !compareKey<0, std::greater<>>(a, b));
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/in/kdtree.hpp:367:84: error: no matching function for call to 'KDTree<std::tuple<int, int, int>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::compareKey<0, std::greater<void> >(const std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&, const std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&)'
         return (!compareKey<0, std::less<>>(a, b) && !compareKey<0, std::greater<>>(a, b));
                                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/in/kdtree.hpp:202:17: note: candidate: template<long unsigned int DIM, class Compare> static bool KDTree<std::tuple<_Elements ...>, ValueType>::compareKey(const Key&, const Key&, Compare) [with long unsigned int DIM = DIM; Compare = Compare; ValueType = std::__cxx11::basic_string<char>; KeyTypes = {int, int, int}]
     static bool compareKey(const Key &a, const Key &b, Compare compare = Compare()) {
                 ^~~~~~~~~~
/in/kdtree.hpp:202:17: note:   template argument deduction/substitution failed:
/in/kdtree.hpp:367:84: note:   cannot convert 'a' (type 'const std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >') to type 'const Key& {aka const std::tuple<int, int, int>&}'
         return (!compareKey<0, std::less<>>(a, b) && !compareKey<0, std::greater<>>(a, b));
                                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~

Information

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