Record Detail

Compile Error

In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp: In instantiation of 'KDTree<std::tuple<_Elements ...>, ValueType>::Node* KDTree<std::tuple<_Elements ...>, ValueType>::erase(KDTree<std::tuple<_Elements ...>, ValueType>::Node*, const Key&) [with long unsigned int DIM = 0; ValueType = std::__cxx11::basic_string<char>; KeyTypes = {int, int, int}; KDTree<std::tuple<_Elements ...>, ValueType>::Key = std::tuple<int, int, int>]':
/in/kdtree.hpp:535:17:   required from 'bool KDTree<std::tuple<_Elements ...>, ValueType>::erase(const Key&) [with ValueType = std::__cxx11::basic_string<char>; KeyTypes = {int, int, int}; KDTree<std::tuple<_Elements ...>, ValueType>::Key = std::tuple<int, int, int>]'
/in/driver/main.cpp:105:33:   required from here
/in/kdtree.hpp:359:25: error: no match for 'operator=' (operand types are 'const Key {aka const std::tuple<int, int, int>}' and 'const Key {aka const std::tuple<int, int, int>}')
             node->key() = minNode->key();
In file included from /in/kdtree.hpp:1:0,
                 from /in/driver/main.cpp:8:
/usr/include/c++/7/tuple:835:7: note: candidate: std::tuple<_Elements>& std::tuple<_Elements>::operator=(const std::tuple<_Elements>&) [with _Elements = {int, int, int}] <near match>
       operator=(const tuple& __in)
       ^~~~~~~~
/usr/include/c++/7/tuple:835:7: note:   passing 'const Key* {aka const std::tuple<int, int, int>*}' as 'this' argument discards qualifiers
/usr/include/c++/7/tuple:842:7: note: candidate: std::tuple<_Elements>& std::tuple<_Elements>::operator=(std::tuple<_Elements>&&) [with _Elements = {int, int, int}] <near match>
       operator=(tuple&& __in)
       ^~~~~~~~
/usr/include/c++/7/tuple:842:7: note:   conversion of argument 1 would be ill-formed:
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:359:25: error: cannot bind rvalue reference of type 'std::tuple<int, int, int>&&' to lvalue of type 'const Key {aka const std::tuple<int, int, int>}'
             node->key() = minNode->key();
In file included from /in/kdtree.hpp:1:0,
                 from /in/driver/main.cpp:8:
/usr/include/c++/7/tuple:853:9: note: candidate: typename std::enable_if<(sizeof... (_UElements) == sizeof... (_Elements)), std::tuple<_Elements>&>::type std::tuple<_Elements>::operator=(const std::tuple<_Args1 ...>&) [with _UElements = {int, int, int}; _Elements = {int, int, int}; typename std::enable_if<(sizeof... (_UElements) == sizeof... (_Elements)), std::tuple<_Elements>&>::type = std::tuple<int, int, int>&] <near match>
         operator=(const tuple<_UElements...>& __in)
         ^~~~~~~~
/usr/include/c++/7/tuple:853:9: note:   passing 'const Key* {aka const std::tuple<int, int, int>*}' as 'this' argument discards qualifiers
/usr/include/c++/7/tuple:863:9: note: candidate: template<class ... _UElements> typename std::enable_if<(sizeof... (_UElements) == sizeof... (_Elements)), std::tuple<_Elements>&>::type std::tuple<_Elements>::operator=(std::tuple<_Args1 ...>&&) [with _UElements = {_UElements ...}; _Elements = {int, int, int}]
         operator=(tuple<_UElements...>&& __in)
         ^~~~~~~~
/usr/include/c++/7/tuple:863:9: note:   template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:359:25: note:   types 'std::tuple<_Tps ...>' and 'const Key {aka const std::tuple<int, int, int>}' have incompatible cv-qualifiers
             node->key() = minNode->key();
/in/kdtree.hpp:369:25: error: no match for 'operator=' (operand types are 'const Key {aka const std::tuple<int, int, int>}' and 'const Key {aka const std::tuple<int, int, int>}')
             node->key() = maxNode->key();
In file included from /in/kdtree.hpp:1:0,
                 from /in/driver/main.cpp:8:
/usr/include/c++/7/tuple:835:7: note: candidate: std::tuple<_Elements>& std::tuple<_Elements>::operator=(const std::tuple<_Elements>&) [with _Elements = {int, int, int}] <near match>
       operator=(const tuple& __in)
       ^~~~~~~~
/usr/include/c++/7/tuple:835:7: note:   passing 'const Key* {aka const std::tuple<int, int, int>*}' as 'this' argument discards qualifiers
/usr/include/c++/7/tuple:842:7: note: candidate: std::tuple<_Elements>& std::tuple<_Elements>::operator=(std::tuple<_Elements>&&) [with _Elements = {int, int, int}] <near match>
       operator=(tuple&& __in)
       ^~~~~~~~
/usr/include/c++/7/tuple:842:7: note:   conversion of argument 1 would be ill-formed:
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:369:25: error: cannot bind rvalue reference of type 'std::tuple<int, int, int>&&' to lvalue of type 'const Key {aka const std::tuple<int, int, int>}'
             node->key() = maxNode->key();
In file included from /in/kdtree.hpp:1:0,
                 from /in/driver/main.cpp:8:
/usr/include/c++/7/tuple:853:9: note: candidate: typename std::enable_if<(sizeof... (_UElements) == sizeof... (_Elements)), std::tuple<_Elements>&>::type std::tuple<_Elements>::operator=(const std::tuple<_Args1 ...>&) [with _UElements = {int, int, int}; _Elements = {int, int, int}; typename std::enable_if<(sizeof... (_UElements) == sizeof... (_Elements)), std::tuple<_Elements>&>::type = std::tuple<int, int, int>&] <near match>
         operator=(const tuple<_UElements...>& __in)
         ^~~~~~~~
/usr/include/c++/7/tuple:853:9: note:   passing 'const Key* {aka const std::tuple<int, int, int>*}' as 'this' argument discards qualifiers
/usr/include/c++/7/tuple:863:9: note: candidate: template<class ... _UElements> typename std::enable_if<(sizeof... (_UElements) == sizeof... (_Elements)), std::tuple<_Elements>&>::type std::tuple<_Elements>::operator=(std::tuple<_Args1 ...>&&) [with _UElements = {_UElements ...}; _Elements = {int, int, int}]
         operator=(tuple<_UElements...>&& __in)
         ^~~~~~~~
/usr/include/c++/7/tuple:863:9: note:   template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:369:25: note:   types 'std::tuple<_Tps ...>' and 'const Key {aka const std::tuple<int, int, int>}' have incompatible cv-qualifiers
             node->key() = maxNode->key();

Information

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