aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-08 12:09:54 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-08 12:09:54 +0100
commit5af310c75b5c352811b1ef612ba8d51f40674703 (patch)
tree37af105fccd36b69272f4c4c38b6f3a760c174d6
parent5bca2928c8047c1d34e35d8c167a7a6644b2515a (diff)
downloadpaludis-5af310c75b5c352811b1ef612ba8d51f40674703.tar.gz
paludis-5af310c75b5c352811b1ef612ba8d51f40674703.tar.xz
Provide access to underlying iterator
-rw-r--r--paludis/util/indirect_iterator-impl.hh9
-rw-r--r--paludis/util/indirect_iterator.hh11
2 files changed, 18 insertions, 2 deletions
diff --git a/paludis/util/indirect_iterator-impl.hh b/paludis/util/indirect_iterator-impl.hh
index 6e4851d..0673997 100644
--- a/paludis/util/indirect_iterator-impl.hh
+++ b/paludis/util/indirect_iterator-impl.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -82,6 +82,13 @@ namespace paludis
}
template <typename Iter_, typename Value_>
+ typename IndirectIterator<Iter_, Value_>::underlying_iterator_type
+ IndirectIterator<Iter_, Value_>::underlying_iterator()
+ {
+ return _iter;
+ }
+
+ template <typename Iter_, typename Value_>
bool operator== (const IndirectIterator<Iter_, Value_> & lhs, const IndirectIterator<Iter_, Value_> & rhs)
{
return lhs._iter == rhs._iter;
diff --git a/paludis/util/indirect_iterator.hh b/paludis/util/indirect_iterator.hh
index 06d1d05..8b20d15 100644
--- a/paludis/util/indirect_iterator.hh
+++ b/paludis/util/indirect_iterator.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -104,6 +104,13 @@ namespace paludis
///\}
+ ///\name Additional typedefs
+ ///\{
+
+ typedef Iter_ underlying_iterator_type;
+
+ ///\}
+
///\name Increment
///\{
@@ -118,6 +125,8 @@ namespace paludis
pointer operator-> () const;
reference operator* () const;
+ underlying_iterator_type underlying_iterator();
+
///\}
};