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>::KDTree_help(const std::vector<std::pair<std::tuple<_Elements ...>, ValueType> >&, 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:433: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
/in/kdtree.hpp:391:48: error: class template argument deduction failed:
         node->left = KDTree_help<DIM_NXT>(std::vector(sortedData.begin(), sortedData.begin() + median), node);
                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/kdtree.hpp:391:48: error: no matching function for call to 'vector(std::vector<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> > > >)'
In file included from /usr/include/c++/7/vector:64:0,
                 from /in/kdtree.hpp:2,
                 from /in/driver/main.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:411:2: note: candidate: template<class _Tp, class _Alloc, class _InputIterator, class> vector(_InputIterator, _InputIterator, const _Alloc&)-> std::vector<_Tp, _Alloc>
  vector(_InputIterator __first, _InputIterator __last,
  ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:411:2: note:   template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:391:48: note:   couldn't deduce template parameter '_Tp'
         node->left = KDTree_help<DIM_NXT>(std::vector(sortedData.begin(), sortedData.begin() + median), node);
                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
                 from /in/kdtree.hpp:2,
                 from /in/driver/main.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:383:7: note: candidate: template<class _Tp, class _Alloc> vector(std::initializer_list<_Tp>, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(initializer_list<value_type> __l,
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:383:7: note:   template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:391:48: note:   '__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> > > >' is not derived from 'std::initializer_list<_Tp>'
         node->left = KDTree_help<DIM_NXT>(std::vector(sortedData.begin(), sortedData.begin() + median), node);
                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
                 from /in/kdtree.hpp:2,
                 from /in/driver/main.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:358:7: note: candidate: template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(vector&& __rv, const allocator_type& __m)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:358:7: note:   template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:391:48: note:   'std::vector<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> > >::iterator {aka __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> > > >}' is not derived from 'std::vector<_Tp, _Alloc>'
         node->left = KDTree_help<DIM_NXT>(std::vector(sortedData.begin(), sortedData.begin() + median), node);
                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
                 from /in/kdtree.hpp:2,
                 from /in/driver/main.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:348:7: note: candidate: template<class _Tp, class _Alloc> vector(const std::vector<_Tp, _Alloc>&, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(const vector& __x, const allocator_type& __a)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:348:7: note:   template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:391:48: note:   'std::vector<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> > >::iterator {aka __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> > > >}' is not derived from 'const std::vector<_Tp, _Alloc>'
         node->left = KDTree_help<DIM_NXT>(std::vector(sortedData.begin(), sortedData.begin() + median), node);
                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
                 from /in/kdtree.hpp:2,
                 from /in/driver/main.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:344:7: note: candidate: template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&)-> std::vector<_Tp, _Alloc>
       vector(vector&& __x) noexcept
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:344:7: note:   template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:391:48: note:   'std::vector<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> > >::iterator {aka __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> > > >}' is not derived from 'std::vector<_Tp, _Alloc>'
         node->left = KDTree_help<DIM_NXT>(std::vector(sortedData.begin(), sortedData.begin() + median), node);
                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
                 from /in/kdtree.hpp:2,
                 from /in/driver/main.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:326:7: note: candidate: template<class _Tp, class _Alloc> vector(const std::vector<_Tp, _Alloc>&)-> std::vector<_Tp, _Alloc>
       vector(const vector& __x)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:326:7: note:   template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:391:48: note:   'std::vector<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> > >::iterator {aka __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> > > >}' is not derived from 'const std::vector<_Tp, _Alloc>'
         node->left = KDTree_help<DIM_NXT>(std::vector(sortedData.begin(), sortedData.begin() + median), node);
                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
                 from /in/kdtree.hpp:2,
                 from /in/driver/main.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:295:7: note: candidate: template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>::size_type, const value_type&, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(size_type __n, const value_type& __value,
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:295:7: note:   template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:391:48: note:   cannot convert 'sortedData.std::vector<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> > >::begin()' (type 'std::vector<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> > >::iterator {aka __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> > > >}') to type 'std::vector<_Tp, _Alloc>::size_type {aka long unsigned int}'
         node->left = KDTree_help<DIM_NXT>(std::vector(sortedData.begin(), sortedData.begin() + median), node);
                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
                 from /in/kdtree.hpp:2,
                 from /in/driver/main.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:283:7: note: candidate: template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>::size_type, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(size_type __n, const allocator_type& __a = allocator_type())
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:283:7: note:   template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:391:48: note:   couldn't deduce template parameter '_Tp'
         node->left = KDTree_help<DIM_NXT>(std::vector(sortedData.begin(), sortedData.begin() + median), node);
                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
                 from /in/kdtree.hpp:2,
                 from /in/driver/main.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:270:7: note: candidate: template<class _Tp, class _Alloc> vector(const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:270:7: note:   template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:391:48: note:   candidate expects 1 argument, 2 provided
         node->left = KDTree_help<DIM_NXT>(std::vector(sortedData.begin(), sortedData.begin() + median), node);
                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
                 from /in/kdtree.hpp:2,
                 from /in/driver/main.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:259:7: note: candidate: template<class _Tp, class _Alloc> vector()-> std::vector<_Tp, _Alloc>
       vector()
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:259:7: note:   template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:391:48: note:   candidate expects 0 arguments, 2 provided
         node->left = KDTree_help<DIM_NXT>(std::vector(sortedData.begin(), sortedData.begin() + median), node);
                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/kdtree.hpp:391:48: error: expression list treated as compound expression in functional cast [-fpermissive]
/in/kdtree.hpp:392:49: error: class template argument deduction failed:
         node->right = KDTree_help<DIM_NXT>(std::vector(sortedData.begin() + median + 1, sortedData.end()), node);
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/kdtree.hpp:392:49: error: no matching function for call to 'vector(__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> > > >, std::vector<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> > >::iterator)'
In file included from /usr/include/c++/7/vector:64:0,
                 from /in/kdtree.hpp:2,
                 from /in/driver/main.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:411:2: note: candidate: template<class _Tp, class _Alloc, class _InputIterator, class> vector(_InputIterator, _InputIterator, const _Alloc&)-> std::vector<_Tp, _Alloc>
  vector(_InputIterator __first, _InputIterator __last,
  ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:411:2: note:   template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:392:49: note:   couldn't deduce template parameter '_Tp'
         node->right = KDTree_help<DIM_NXT>(std::vector(sortedData.begin() + median + 1, sortedData.end()), node);
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
                 from /in/kdtree.hpp:2,
                 from /in/driver/main.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:383:7: note: candidate: template<class _Tp, class _Alloc> vector(std::initializer_list<_Tp>, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(initializer_list<value_type> __l,
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:383:7: note:   template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:392:49: note:   '__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> > > >' is not derived from 'std::initializer_list<_Tp>'
         node->right = KDTree_help<DIM_NXT>(std::vector(sortedData.begin() + median + 1, sortedData.end()), node);
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
                 from /in/kdtree.hpp:2,
                 from /in/driver/main.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:358:7: note: candidate: template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(vector&& __rv, const allocator_type& __m)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:358:7: note:   template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:392:49: note:   '__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> > > >' is not derived from 'std::vector<_Tp, _Alloc>'
         node->right = KDTree_help<DIM_NXT>(std::vector(sortedData.begin() + median + 1, sortedData.end()), node);
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
                 from /in/kdtree.hpp:2,
                 from /in/driver/main.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:348:7: note: candidate: template<class _Tp, class _Alloc> vector(const std::vector<_Tp, _Alloc>&, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(const vector& __x, const allocator_type& __a)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:348:7: note:   template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:392:49: note:   '__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> > > >' is not derived from 'const std::vector<_Tp, _Alloc>'
         node->right = KDTree_help<DIM_NXT>(std::vector(sortedData.begin() + median + 1, sortedData.end()), node);
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
                 from /in/kdtree.hpp:2,
                 from /in/driver/main.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:344:7: note: candidate: template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&)-> std::vector<_Tp, _Alloc>
       vector(vector&& __x) noexcept
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:344:7: note:   template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:392:49: note:   '__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> > > >' is not derived from 'std::vector<_Tp, _Alloc>'
         node->right = KDTree_help<DIM_NXT>(std::vector(sortedData.begin() + median + 1, sortedData.end()), node);
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
                 from /in/kdtree.hpp:2,
                 from /in/driver/main.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:326:7: note: candidate: template<class _Tp, class _Alloc> vector(const std::vector<_Tp, _Alloc>&)-> std::vector<_Tp, _Alloc>
       vector(const vector& __x)
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:326:7: note:   template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:392:49: note:   '__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> > > >' is not derived from 'const std::vector<_Tp, _Alloc>'
         node->right = KDTree_help<DIM_NXT>(std::vector(sortedData.begin() + median + 1, sortedData.end()), node);
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
                 from /in/kdtree.hpp:2,
                 from /in/driver/main.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:295:7: note: candidate: template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>::size_type, const value_type&, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(size_type __n, const value_type& __value,
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:295:7: note:   template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:392:84: note:   cannot convert 'sortedData.std::vector<std::pair<std::tuple<int, int, int>, std::__cxx11::basic_string<char> > >::begin().__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> > > >::operator+(((__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> > > >::difference_type)median)).__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> > > >::operator+(1)' (type '__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> > > >') to type 'std::vector<_Tp, _Alloc>::size_type {aka long unsigned int}'
         node->right = KDTree_help<DIM_NXT>(std::vector(sortedData.begin() + median + 1, sortedData.end()), node);
In file included from /usr/include/c++/7/vector:64:0,
                 from /in/kdtree.hpp:2,
                 from /in/driver/main.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:283:7: note: candidate: template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>::size_type, const allocator_type&)-> std::vector<_Tp, _Alloc>
       vector(size_type __n, const allocator_type& __a = allocator_type())
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:283:7: note:   template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:392:49: note:   couldn't deduce template parameter '_Tp'
         node->right = KDTree_hel

Information

Submit By
Type
Submission
Homework
Project 3: K-D tree
Language
C++
Submit At
2023-12-21 23:35:52
Judged At
2023-12-21 23:35:52
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes