#include "dll.h"
#include <exception>
int main()
{ 
	List<int> aList;
	aList.push_front(4);
	aList.push_back(2);
	aList.push_front(5);
	aList.push_front(12);
	cout <<"after four push uses: "<<endl;
	aList.print();
	
	aList.pop_front();
	cout <<"Just after pop front"<<endl;
	aList.print();
	
	aList.pop_back();
	cout <<"just after pop back"<<endl;
	aList.print();
	
	List<int> aList2(aList);
	cout <<"construction of list2 using list,  list2:"<<endl;
	aList2.print();
	
	for (int i =0; i< 10; i++)
		aList2.push_back(i);
	cout <<"list2 after pushback"<<endl;
	aList2.print();
	
	aList2.splice(aList2.begin()->next->next->next->next,aList);
	cout <<"list2 with list sliced 4 positions after begining"<<endl;
	aList2.print();
	cout <<"List:"<<endl;
	aList.print();
	
	cout <<"list assigned list2"<<endl;
	aList=aList2;
	
	cout<<"Size of alist: "<<aList.size()<<endl;
	return 0;
}
