Exemple #1
0
	template < typename...Args > void emplace_back(Args && ... args)
	{
		node *newdat = new node(mBack.backward(), new T(args...), &mBack);
		mBack.backward()->forward(newdat);
		mBack.backward(newdat);
		++mSize;
	}
Exemple #2
0
	void push_back(const T & dat)
	{
		node *newdat = new node(mBack.backward(), new T(dat), &mBack);
		mBack.backward()->forward(newdat);
		mBack.backward(newdat);
		++mSize;
	}
Exemple #3
0
	void pop_back()
	{
		if (mSize == 0)
			return;
		node *current = mBack.backward();
		current->backward()->forward(&mBack);
		mBack.backward(current->backward());
		delete current->data();
		delete current;
		--mSize;
	}
Exemple #4
0
	node(const node & obj):mFront(obj.forward()), mBack(obj.backward()), mDat(obj.data())
	{
	}
Exemple #5
0
	reverse_iterator rbegin()
	{
		return reverse_iterator(mBack.backward());
	}
Exemple #6
0
	T & back()
	{
		if(!mBack.backward()->usable())
			throw cov::error("E0005");
		return *mBack.backward()->data();
	}