0_0_17138917_18912.cpp: In function 'KDTree::Node* KDTree::build(KDTree::Point*, int, int, int)':
0_0_17138917_18912.cpp:82:11: error: declaration of 'KDTree::Node* curPoint' shadows a parameter
Node *curPoint = tail++;
^
0_0_17138917_18912.cpp:86:21: error: no match for 'operator=' (operand types are 'KDTree::Point' and 'KDTree::Node')
curPoint->point = curPoint[mid];
^
0_0_17138917_18912.cpp:86:21: note: candidates are:
0_0_17138917_18912.cpp:22:8: note: KDTree::Point& KDTree::Point::operator=(const KDTree::Point&)
struct Point {
^
0_0_17138917_18912.cpp:22:8: note: no known conversion for argument 1 from 'KDTree::Node' to 'const KDTree::Point&'
0_0_17138917_18912.cpp:22:8: note: KDTree::Point& KDTree::Point::operator=(KDTree::Point&&)
0_0_17138917_18912.cpp:22:8: note: no known conversion for argument 1 from 'KDTree::Node' to 'KDTree::Point&&'
0_0_17138917_18912.cpp:88:50: error: cannot convert 'KDTree::Node*' to 'KDTree::Point*' for argument '1' to 'KDTree::Node* KDTree::build(KDTree::Point*, int, int, int)'
curPoint->lc = build(curPoint,l,mid,(div+1)%K);
^
0_0_17138917_18912.cpp:89:52: error: cannot convert 'KDTree::Node*' to 'KDTree::Point*' for argument '1' to 'KDTree::Node* KDTree::build(KDTree::Point*, int, int, int)'
curPoint->rc = build(curPoint,mid+1,r,(div+1)%K);
^
0_0_17138917_18912.cpp: In function 'int main()':
0_0_17138917_18912.cpp:153:51: error: 'const value_type' has no member named 'p'
curPoint[cnt++] = KDTree::q.top().p;
^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:71:0,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/istream:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/sstream:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/complex:45,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/ccomplex:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:52,
from 0_0_17138917_18912.cpp:5:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = KDTree::Node*; _Iterator2 = KDTree::Node*; _Compare = KDTree::CmpX]':
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:1675:25: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = KDTree::Node*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<KDTree::CmpX>]'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:1984:61: required from 'void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = KDTree::Node*; _Size = long long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<KDTree::CmpX>]'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:4657:47: required from 'void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = KDTree::Node*; _Compare = KDTree::CmpX]'
0_0_17138917_18912.cpp:85:61: required from here
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/predefined_ops.h:121:46: error: no match for call to '(KDTree::CmpX) (KDTree::Node&, KDTree::Node&)'
{ return bool(_M_comp(*__it1, *__it2)); }
^
0_0_17138917_18912.cpp:53:8: note: candidate is:
struct CmpX {
^
0_0_17138917_18912.cpp:58:10: note: bool KDTree::CmpX::operator()(const KDTree::Point&, const KDTree::Point&)
bool operator()(const Point &a,const Point &b) {
^
0_0_17138917_18912.cpp:58:10: note: no known conversion for argument 1 from 'KDTree::Node' to 'const KDTree::Point&'
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:71:0,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/istream:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/sstream:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/complex:45,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/ccomplex:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:52,
from 0_0_17138917_18912.cpp:5:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Val_comp_iter<_Compare>::operator()(_Value&, _Iterator) [with _Value = KDTree::Node; _Iterator = KDTree::Node*; _Compare = KDTree::CmpX]':
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:1827:34: required from 'void std::__unguarded_linear_insert(_RandomAccessIterator, _Compare) [with _RandomAccessIterator = KDTree::Node*; _Compare = __gnu_cxx::__ops::_Val_comp_iter<KDTree::CmpX>]'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:1855:46: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = KDTree::Node*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<KDTree::CmpX>]'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:1997:52: required from 'void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = KDTree::Node*; _Size = long long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<KDTree::CmpX>]'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:4657:47: required from 'void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = KDTree::Node*; _Compare = KDTree::CmpX]'
0_0_17138917_18912.cpp:85:61: required from here
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/predefined_ops.h:166:37: error: no match for call to '(KDTree::CmpX) (KDTree::Node&, KDTree::Node&)'
{ return bool(_M_comp(__val, *__it)); }
^
0_0_17138917_18912.cpp:53:8: note: candidate is:
struct CmpX {
^
0_0_17138917_18912.cpp:58:10: note: bool KDTree::CmpX::operator()(const KDTree::Point&, const KDTree::Point&)
bool operator()(const Point &a,const Point &b) {
^
0_0_17138917_18912.cpp:58:10: note: no known conversion for argument 1 from 'KDTree::Node' to 'const KDTree::Point&'
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:71:0,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/istream:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/sstream:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/complex:45,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/ccomplex:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:52,
from 0_0_17138917_18912.cpp:5:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_comp_val<_Compare>::operator()(_Iterator, _Value&) [with _Iterator = KDTree::Node*; _Value = KDTree::Node; _Compare = KDTree::CmpX]':
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_heap.h:129:76: required from 'void std::__push_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = KDTree::Node*; _Distance = long long int; _Tp = KDTree::Node; _Compare = __gnu_cxx::__ops::_Iter_comp_val<KDTree::CmpX>]'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_heap.h:230:51: required from 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = KDTree::Node*; _Distance = long long int; _Tp = KDTree::Node; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<KDTree::CmpX>]'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_heap.h:334:15: required from 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = KDTree::Node*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<KDTree::CmpX>]'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:1673:49: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = KDTree::Node*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<KDTree::CmpX>]'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:1984:61: required from 'void std::__introselect(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = KDTree::Node*; _Size = long long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<KDTree::CmpX>]'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:465
|