Hello,<div><br></div><div>I am trying to compile with g++.</div><div><br></div><div>However I end up getting these errors all the time</div><div><br></div><div><div>g++ -I.. -Wall -ansi -pedantic -g -O2 -o test_kdtree test_kdtree.cpp</div>
<div>In file included from /usr/lib/gcc/x86_64-redhat-linux/4.7.0/../../../../include/c++/4.7.0/ext/hash_map:61:0,</div><div>                 from common/include/types.hpp:15,</div><div>                 from common/config.hpp:20,</div>
<div>                 from common/serialization_buffer.hpp:19,</div><div>                 from kdtree.hpp:86,</div><div>                 from test_kdtree.cpp:6:</div><div>/usr/lib/gcc/x86_64-redhat-linux/4.7.0/../../../../include/c++/4.7.0/backward/backward_warning.h:33:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]</div>
<div>In file included from allocator.hpp:12:0,</div><div>                 from kdtree.hpp:81,</div><div>                 from test_kdtree.cpp:6:</div><div>node.hpp:93:20: error: ‘serialization_buffer’ has not been declared</div>
<div>node.hpp:106:20: error: ‘serialization_buffer’ has not been declared</div><div>node.hpp: In member function ‘void KDTree::_Node<_Val>::_encode(int&)’:</div><div>node.hpp:102:11: error: request for member ‘push_back’ in ‘save_buf’, which is of non-class type ‘int’</div>
<div>node.hpp: In member function ‘void KDTree::_Node<_Val>::_decode(int&)’:</div><div>node.hpp:108:40: error: request for member ‘front_length’ in ‘load_buf’, which is of non-class type ‘int’</div><div>node.hpp:112:11: error: request for member ‘copy_front’ in ‘load_buf’, which is of non-class type ‘int’</div>
<div>node.hpp:113:11: error: request for member ‘pop_front’ in ‘load_buf’, which is of non-class type ‘int’</div><div>In file included from common/config.hpp:20:0,</div><div>                 from common/serialization_buffer.hpp:19,</div>
<div>                 from kdtree.hpp:86,</div><div>                 from test_kdtree.cpp:6:</div><div>common/include/types.hpp: At global scope:</div><div>common/include/types.hpp:37:17: warning: comma at end of enumerator list [-pedantic]</div>
<div>In file included from test_kdtree.cpp:6:0:</div><div>kdtree.hpp: In instantiation of ‘KDTree::_Node<_Val>* KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::_M_new_node(KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::const_reference, KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::_Base_ptr, KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::_Base_ptr, KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::_Base_ptr) [with long unsigned int __K = 3ul; _Val = triplet; _Acc = std::pointer_to_binary_function<triplet, long unsigned int, double>; _Dist = KDTree::squared_difference<double, double>; _Cmp = std::less<double>; _Alloc = std::allocator<KDTree::_Node<triplet> >; KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::_Link_type = KDTree::_Node<triplet>*; KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::const_reference = const triplet&; KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::value_type = triplet; KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::_Base_ptr = KDTree::_Node_base*]’:</div>
<div>kdtree.hpp:326:57:   required from ‘KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::iterator KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::insert(KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::const_reference) [with long unsigned int __K = 3ul; _Val = triplet; _Acc = std::pointer_to_binary_function<triplet, long unsigned int, double>; _Dist = KDTree::squared_difference<double, double>; _Cmp = std::less<double>; _Alloc = std::allocator<KDTree::_Node<triplet> >; KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::iterator = KDTree::_Iterator<triplet, const triplet&, const triplet*>; KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::const_reference = const triplet&; KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::value_type = triplet]’</div>
<div>test_kdtree.cpp:96:29:   required from here</div><div>kdtree.hpp:1323:10: error: ‘_M_construct_node’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]</div>
<div>kdtree.hpp:1323:10: note: declarations in dependent base ‘KDTree::_Alloc_base<triplet, std::allocator<KDTree::_Node<triplet> > >’ are not found by unqualified lookup</div><div>kdtree.hpp:1323:10: note: use ‘this->_M_construct_node’ instead</div>
<div>kdtree.hpp: In instantiation of ‘void KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::_M_delete_node(KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::_Link_type) [with long unsigned int __K = 3ul; _Val = triplet; _Acc = std::pointer_to_binary_function<triplet, long unsigned int, double>; _Dist = KDTree::squared_difference<double, double>; _Cmp = std::less<double>; _Alloc = std::allocator<KDTree::_Node<triplet> >; KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::_Link_type = KDTree::_Node<triplet>*]’:</div>
<div>kdtree.hpp:388:9:   required from ‘void KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::erase(const const_iterator&) [with long unsigned int __K = 3ul; _Val = triplet; _Acc = std::pointer_to_binary_function<triplet, long unsigned int, double>; _Dist = KDTree::squared_difference<double, double>; _Cmp = std::less<double>; _Alloc = std::allocator<KDTree::_Node<triplet> >; KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::const_iterator = KDTree::_Iterator<triplet, const triplet&, const triplet*>]’</div>
<div>kdtree.hpp:369:9:   required from ‘void KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::erase(KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::const_reference) [with long unsigned int __K = 3ul; _Val = triplet; _Acc = std::pointer_to_binary_function<triplet, long unsigned int, double>; _Dist = KDTree::squared_difference<double, double>; _Cmp = std::less<double>; _Alloc = std::allocator<KDTree::_Node<triplet> >; KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::const_reference = const triplet&; KDTree::KDTree<__K, _Val, _Acc, _Dist, _Cmp, _Alloc>::value_type = triplet]’</div>
<div>test_kdtree.cpp:145:15:   required from here</div><div>kdtree.hpp:1341:9: error: ‘_M_destroy_node’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]</div>
<div>kdtree.hpp:1341:9: note: declarations in dependent base ‘KDTree::_Alloc_base<triplet, std::allocator<KDTree::_Node<triplet> > >’ are not found by unqualified lookup</div><div>kdtree.hpp:1341:9: note: use ‘this->_M_destroy_node’ instead</div>
<div>kdtree.hpp:1342:9: error: ‘_M_deallocate_node’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]</div><div>kdtree.hpp:1342:9: note: declarations in dependent base ‘KDTree::_Alloc_base<triplet, std::allocator<KDTree::_Node<triplet> > >’ are not found by unqualified lookup</div>
<div>kdtree.hpp:1342:9: note: use ‘this->_M_deallocate_node’ instead</div></div><div><br></div>