diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-12-11 05:28:05 +0100 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-12-11 05:39:05 +0100 |
commit | efec323eba5b0971f2a30e08bd208af1aba04b26 (patch) | |
tree | 274e830378364646462babde08744c268bfe5925 | |
parent | 0913dec10964f02a0b813181bb2a076d814b2909 (diff) |
Add constructors to List.
-rw-r--r-- | common/list.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/list.h b/common/list.h index cf429e5..2ad41fd 100644 --- a/common/list.h +++ b/common/list.h @@ -9,6 +9,13 @@ template<class T, class B = std::vector<T> > class List : public B { public: + //! Default constructor. + List() : B() {} + + //! Iterator constructor. + template <class InputIterator> + List(InputIterator first, InputIterator last) : B(first, last) {} + //! Sort the list. void sort() { std::sort(B::begin(), B::end()); |