Пример #1
0
template<> inline void BCP_vec<char>::push_back(const_reference x)
{
	if (finish != end_of_storage)
		*finish++ = x;
	else
		insert_aux(finish, x);
}
Пример #2
0
//------------------------------------------------------------------------------
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;
}
Пример #3
0
	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 );
	}
Пример #4
0
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());  
}  
Пример #5
0
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());  
}  
Пример #6
0
void List<T, Allocator>::resize(size_type count, T value)  
{  
    if(size() >= count)  
        return;   
    insert_aux(end(), count - size(), value, std::true_type());  
}  
Пример #7
0
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());  
}  
Пример #8
0
void List<T, Allocator>::insert(iterator pos, size_type count, const T& value)  
{  
    insert_aux(pos, count, value, std::true_type());  
}  
Пример #9
0
void List<T, Allocator>::push_front(const T& value)  
{  
    insert_aux(begin(), 1, value, std::true_type());  
}  
Пример #10
0
void List<T, Allocator>::push_back(const T& value)  
{  
    insert_aux(end(), 1, value, std::true_type());  
}