template<> inline void BCP_vec<char>::push_back(const_reference x) { if (finish != end_of_storage) *finish++ = x; else insert_aux(finish, x); }
//------------------------------------------------------------------------------ template<> inline BCP_vec<char>::iterator BCP_vec<char>::insert(iterator position, const_reference x) { const size_t n = position - start; if (finish != end_of_storage && position == finish) { *finish++ = x; } else insert_aux(position, x); return start + n; }
void insert( const vector_type& min, const vector_type& max, const T& x ) { //aabb_node* n = new aabb_node; aabb_node* n = create_node(); n->min = min; n->max = max; n->car = NULL; n->cdr = NULL; n->user = x; if( !root_ ) { root_ = n; return; } insert_aux( &root_, n ); }
void List<T, Allocator>::assign_aux(InputIterator first, InputIterator last, std::false_type) { destroy(begin(), end()); deallocate(begin(), end()); insert_aux(end(), first, last, std::false_type()); }
void List<T, Allocator>::assign_aux(size_type count, const T& value, std::true_type) { destroy(begin(), end()); deallocate(begin(), end()); insert_aux(end(), count, value, std::true_type()); }
void List<T, Allocator>::resize(size_type count, T value) { if(size() >= count) return; insert_aux(end(), count - size(), value, std::true_type()); }
void List<T, Allocator>::insert(iterator pos, InputIterator first, InputIterator last) { typedef std::integral_constant<bool, std::is_integral<InputIterator>::value> type; insert_aux(pos, first, last, type()); }
void List<T, Allocator>::insert(iterator pos, size_type count, const T& value) { insert_aux(pos, count, value, std::true_type()); }
void List<T, Allocator>::push_front(const T& value) { insert_aux(begin(), 1, value, std::true_type()); }
void List<T, Allocator>::push_back(const T& value) { insert_aux(end(), 1, value, std::true_type()); }