void Quad_Tree::remove(const std::vector<Object*>::reverse_iterator& it) { if ( !leaf() ) { if ( objects.size() - 1 <= max_children ) unsplit(); else for ( auto c : child ) c->remove(*it); } objects.erase(--it.base()); }
inline void rerase_at(std::vector<element_type>::reverse_iterator i) { // base iterator points to the element *after* the correct element if (i != m_elements.rend()) erase_at(i.base() - 1); }