Record Detail

Compile Error

In file included from /usr/include/c++/7/bits/stl_algobase.h:71:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/string:40,
                 from /usr/include/c++/7/stdexcept:39,
                 from /usr/include/c++/7/array:39,
                 from /usr/include/c++/7/tuple:39,
                 from /in/kdtree.hpp:1,
                 from /in/driver/main.cpp:8:
/usr/include/c++/7/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = __gnu_cxx::__normal_iterator<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >*, std::vector<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> > > >; _Iterator2 = __gnu_cxx::__normal_iterator<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >*, std::vector<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> > > >; _Compare = std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> > (*)(const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&, const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&)]':
/usr/include/c++/7/bits/stl_algo.h:1674:12:   required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >*, std::vector<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> > (*)(const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&, const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&)>]'
/usr/include/c++/7/bits/stl_algo.h:1985:26:   required from 'void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >*, std::vector<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> > > >; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> > (*)(const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&, const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&)>]'
/usr/include/c++/7/bits/stl_algo.h:4805:25:   required from 'void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >*, std::vector<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> > > >; _Compare = std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> > (*)(const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&, const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&)]'
/in/kdtree.hpp:448:25:   required from 'KDTree<std::tuple<_Elements ...>, ValueType>::Node* KDTree<std::tuple<_Elements ...>, ValueType>::init_helper(std::vector<std::pair<std::tuple<_Elements ...>, ValueType> >&, int, int, KDTree<std::tuple<_Elements ...>, ValueType>::Node*) [with long unsigned int DIM = 0; ValueType = std::__cxx11::basic_string<char>; KeyTypes = {int, int, int}]'
/in/kdtree.hpp:483:30:   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
/usr/include/c++/7/bits/predefined_ops.h:143:18: error: invalid cast from type 'std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >' to type 'bool'
         { return bool(_M_comp(*__it1, *__it2)); }
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/7/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Val_comp_iter<_Compare>::operator()(_Value&, _Iterator) [with _Value = std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >; _Iterator = __gnu_cxx::__normal_iterator<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >*, std::vector<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> > > >; _Compare = std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> > (*)(const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&, const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&)]':
/usr/include/c++/7/bits/stl_algo.h:1828:20:   required from 'void std::__unguarded_linear_insert(_RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >*, std::vector<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> > > >; _Compare = __gnu_cxx::__ops::_Val_comp_iter<std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> > (*)(const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&, const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&)>]'
/usr/include/c++/7/bits/stl_algo.h:1855:36:   required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >*, std::vector<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> > (*)(const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&, const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&)>]'
/usr/include/c++/7/bits/stl_algo.h:1998:28:   required from 'void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >*, std::vector<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> > > >; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> > (*)(const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&, const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&)>]'
/usr/include/c++/7/bits/stl_algo.h:4805:25:   required from 'void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >*, std::vector<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> > > >; _Compare = std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> > (*)(const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&, const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&)]'
/in/kdtree.hpp:448:25:   required from 'KDTree<std::tuple<_Elements ...>, ValueType>::Node* KDTree<std::tuple<_Elements ...>, ValueType>::init_helper(std::vector<std::pair<std::tuple<_Elements ...>, ValueType> >&, int, int, KDTree<std::tuple<_Elements ...>, ValueType>::Node*) [with long unsigned int DIM = 0; ValueType = std::__cxx11::basic_string<char>; KeyTypes = {int, int, int}]'
/in/kdtree.hpp:483:30:   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
/usr/include/c++/7/bits/predefined_ops.h:215:11: error: invalid cast from type 'std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >' to type 'bool'
  { return bool(_M_comp(__val, *__it)); }
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/7/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_comp_val<_Compare>::operator()(_Iterator, _Value&) [with _Iterator = __gnu_cxx::__normal_iterator<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >*, std::vector<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> > > >; _Value = std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >; _Compare = std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> > (*)(const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&, const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&)]':
/usr/include/c++/7/bits/stl_heap.h:133:48:   required from 'void std::__push_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >*, std::vector<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> > > >; _Distance = long int; _Tp = std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >; _Compare = __gnu_cxx::__ops::_Iter_comp_val<std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> > (*)(const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&, const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&)>]'
/usr/include/c++/7/bits/stl_heap.h:237:23:   required from 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >*, std::vector<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> > > >; _Distance = long int; _Tp = std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> > (*)(const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&, const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&)>]'
/usr/include/c++/7/bits/stl_heap.h:342:22:   required from 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >*, std::vector<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> > (*)(const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&, const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&)>]'
/usr/include/c++/7/bits/stl_algo.h:1672:23:   required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >*, std::vector<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> > (*)(const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&, const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&)>]'
/usr/include/c++/7/bits/stl_algo.h:1985:26:   required from 'void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >*, std::vector<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> > > >; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> > (*)(const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&, const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&)>]'
/usr/include/c++/7/bits/stl_algo.h:4805:25:   required from 'void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> >*, std::vector<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> > > >; _Compare = std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> > (*)(const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&, const std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >&)]'
/in/kdtree.hpp:448:25:   required from 'KDTree<std::tuple<_Elements ...>, ValueType>::Node* KDTree<std::tuple<_Elements ...>, ValueType>::init_helper(std::vector<std::pair<std::tuple<_Elements ...>, ValueType> >&, int, int, KDTree<std::tuple<_Elements ...>, ValueType>::Node*) [with long unsigned int DIM = 0; ValueType = std::__cxx11::basic_string<char>; KeyTypes = {int, int, int}]'
/in/kdtree.hpp:483:30:   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
/usr/include/c++/7/bits/predefined_ops.h:177:11: error: invalid cast from type 'std::pair<const std::tuple<int, int, int>, std::__cxx11::basic_string<char> >' to type 'bool'
  { return bool(_M_comp(*__it, __val)); }
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~

Information

Submit By
Type
Submission
Homework
Project 3: K-D tree
Language
C++
Submit At
2022-11-30 23:17:20
Judged At
2022-11-30 23:17:20
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes