aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-04-17 22:27:36 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-04-17 22:27:36 +0000
commitab89dca59cc680035b7c6eed7c4482cc6605be2d (patch)
tree4cf8d31de9c331482d475f9d0558de446d89e2bb
parentd0da24aded11d84360d155099bf79a46a12fd085 (diff)
downloadpaludis-ab89dca59cc680035b7c6eed7c4482cc6605be2d.tar.gz
paludis-ab89dca59cc680035b7c6eed7c4482cc6605be2d.tar.xz
Add convenience indirect_iterator generation function
-rw-r--r--paludis/util/iterator.hh9
1 files changed, 9 insertions, 0 deletions
diff --git a/paludis/util/iterator.hh b/paludis/util/iterator.hh
index 61378a5..6f75320 100644
--- a/paludis/util/iterator.hh
+++ b/paludis/util/iterator.hh
@@ -188,6 +188,15 @@ namespace paludis
};
/**
+ * Convenience constructor for an IndirectIterator.
+ */
+ template <typename Value_, typename Iter_>
+ IndirectIterator<Iter_, Value_> indirect_iterator(const Iter_ & i)
+ {
+ return IndirectIterator<Iter_, Value_>(i);
+ }
+
+ /**
* A FilterInsertIterator is an insert iterator that only performs an insert
* if a particular predicate function returns true for the object to be
* inserted.