sources/list.h

changeset 87
53c2aecb9704
parent 73
07dda51a7a8e
child 88
08ccaf26cffd
--- a/sources/list.h	Wed May 27 21:44:42 2015 +0300
+++ b/sources/list.h	Thu Jul 23 00:16:47 2015 +0300
@@ -32,9 +32,9 @@
 #include "basics.h"
 #include <algorithm>
 #include <deque>
-#include <initializer_list>
 #include <functional>
 #include <cassert>
+#include <vector>
 #include "range.h"
 
 // -------------------------------------------------------------------------------------------------
@@ -57,9 +57,6 @@
 	Container (const C& other) :
 		m_container (other) {}
 
-	Container (std::initializer_list<T>&& a) :
-		m_container (a) {}
-
 	T& append (const T& value)
 	{
 		m_container.push_back (value);
@@ -329,17 +326,28 @@
 //
 
 template<typename T>
-using List = Container<T, std::deque<T>>;
+class List : public Container<T, std::deque<T> >
+{
+public:
+	typedef Container<T, std::deque<T> > Super;
+
+	List(){}
+
+	List (int numvalues) :
+		Super (numvalues) {}
+
+	List (const Super& other) :
+		Super (other) {}
+};
 
 // -------------------------------------------------------------------------------------------------
 //
 
 template<typename T>
-class Vector : public Container<T, std::vector<T>>
+class Vector : public Container<T, std::vector<T> >
 {
 public:
-	using Super = Container<T, std::vector<T>>;
-	using typename Super::Container;
+	typedef Container<T, std::vector<T> > Super;
 
 	Vector(){}
 

mercurial