Record Detail

Compile Error

/in/driver/main.cpp: In function 'int main()':
/in/driver/main.cpp:65:37: 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> > >::insert(std::tuple<int, int, int>&, std::__cxx11::string&)'
             kdTree.insert(tup, value);
                                     ^
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:204:10: note: candidate: template<long unsigned int DIM> bool KDTree<std::tuple<_Elements ...>, ValueType>::insert(const Key&, const Value&, KDTree<std::tuple<_Elements ...>, ValueType>::Node*&, KDTree<std::tuple<_Elements ...>, ValueType>::Node*) [with long unsigned int DIM = DIM; ValueType = std::__cxx11::basic_string<char>; KeyTypes = {int, int, int}]
     bool insert(const Key &key, const Value &value, Node *&node, Node *parent) {//insert in slide
          ^~~~~~
/in/kdtree.hpp:204:10: note:   template argument deduction/substitution failed:
/in/driver/main.cpp:65:37: note:   candidate expects 4 arguments, 2 provided
             kdTree.insert(tup, value);
                                     ^
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:487:10: note: candidate: void KDTree<std::tuple<_Elements ...>, ValueType>::insert(const Key&, int) [with ValueType = std::__cxx11::basic_string<char>; KeyTypes = {int, int, int}; KDTree<std::tuple<_Elements ...>, ValueType>::Key = std::tuple<int, int, int>]
     void insert(const Key &key, int value) {
          ^~~~~~
/in/kdtree.hpp:487:10: note:   no known conversion for argument 2 from 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' to 'int'
/in/driver/main.cpp:147:60: 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> > >::insert(std::tuple<int, int, int>, const char [6])'
             kdTree.insert(std::make_tuple(0, 0, 0), "VE000");
                                                            ^
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:204:10: note: candidate: template<long unsigned int DIM> bool KDTree<std::tuple<_Elements ...>, ValueType>::insert(const Key&, const Value&, KDTree<std::tuple<_Elements ...>, ValueType>::Node*&, KDTree<std::tuple<_Elements ...>, ValueType>::Node*) [with long unsigned int DIM = DIM; ValueType = std::__cxx11::basic_string<char>; KeyTypes = {int, int, int}]
     bool insert(const Key &key, const Value &value, Node *&node, Node *parent) {//insert in slide
          ^~~~~~
/in/kdtree.hpp:204:10: note:   template argument deduction/substitution failed:
/in/driver/main.cpp:147:60: note:   candidate expects 4 arguments, 2 provided
             kdTree.insert(std::make_tuple(0, 0, 0), "VE000");
                                                            ^
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:487:10: note: candidate: void KDTree<std::tuple<_Elements ...>, ValueType>::insert(const Key&, int) [with ValueType = std::__cxx11::basic_string<char>; KeyTypes = {int, int, int}; KDTree<std::tuple<_Elements ...>, ValueType>::Key = std::tuple<int, int, int>] <near match>
     void insert(const Key &key, int value) {
          ^~~~~~
/in/kdtree.hpp:487:10: note:   conversion of argument 2 would be ill-formed:
/in/driver/main.cpp:147:60: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
             kdTree.insert(std::make_tuple(0, 0, 0), "VE000");
                                                            ^

Information

Submit By
Type
Submission
Homework
Project 3
Language
C++
Submit At
2022-07-17 12:57:09
Judged At
2022-07-17 12:57:09
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes