summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2010-12-11 05:28:05 +0100
committerVegard Storheil Eriksen <zyp@jvnv.net>2010-12-11 05:39:05 +0100
commitefec323eba5b0971f2a30e08bd208af1aba04b26 (patch)
tree274e830378364646462babde08744c268bfe5925
parent0913dec10964f02a0b813181bb2a076d814b2909 (diff)
Add constructors to List.
-rw-r--r--common/list.h7
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());