aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-11-02 07:39:03 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-11-02 07:39:03 +0000
commitd832a1dd9e9718619bfb7bb7d0e3b48e26e65a33 (patch)
tree181f346e514cd8ff33c732f2b33ce234f1061cec /paludis/repositories/e
parentfef0280d7576927a74b8e7d2a0a96e700348f8b3 (diff)
downloadpaludis-d832a1dd9e9718619bfb7bb7d0e3b48e26e65a33.tar.gz
paludis-d832a1dd9e9718619bfb7bb7d0e3b48e26e65a33.tar.xz
Stop using libebt, libwrapiter. C++0x compliant iterators. Use static_assert, concepts where available.
Diffstat (limited to 'paludis/repositories/e')
-rw-r--r--paludis/repositories/e/aa_visitor.cc2
-rw-r--r--paludis/repositories/e/aa_visitor.hh3
-rw-r--r--paludis/repositories/e/aa_visitor_TEST.cc1
-rw-r--r--paludis/repositories/e/dep_lexer.cc11
-rw-r--r--paludis/repositories/e/dep_lexer.hh5
-rw-r--r--paludis/repositories/e/dep_lexer_TEST.cc2
-rw-r--r--paludis/repositories/e/dep_parser.cc3
-rw-r--r--paludis/repositories/e/dep_parser_TEST.cc1
-rw-r--r--paludis/repositories/e/dep_spec_pretty_printer.cc1
-rw-r--r--paludis/repositories/e/dep_spec_pretty_printer_TEST.cc1
-rw-r--r--paludis/repositories/e/e_key.cc7
-rw-r--r--paludis/repositories/e/e_key.hh2
-rw-r--r--paludis/repositories/e/e_mask.cc6
-rw-r--r--paludis/repositories/e/e_mask.hh6
-rw-r--r--paludis/repositories/e/e_repository.cc11
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc2
-rw-r--r--paludis/repositories/e/e_repository_mask_file.cc8
-rw-r--r--paludis/repositories/e/e_repository_mask_file.hh4
-rw-r--r--paludis/repositories/e/e_repository_news.cc6
-rw-r--r--paludis/repositories/e/e_repository_news.hh16
-rw-r--r--paludis/repositories/e/e_repository_profile.cc13
-rw-r--r--paludis/repositories/e/e_repository_profile.hh6
-rw-r--r--paludis/repositories/e/e_repository_profile_file.cc25
-rw-r--r--paludis/repositories/e/e_repository_profile_file.hh4
-rw-r--r--paludis/repositories/e/e_repository_sets.cc11
-rw-r--r--paludis/repositories/e/e_repository_sets_TEST.cc2
-rw-r--r--paludis/repositories/e/eapi.cc3
-rw-r--r--paludis/repositories/e/eapi_phase.cc9
-rw-r--r--paludis/repositories/e/eapi_phase.hh6
-rw-r--r--paludis/repositories/e/ebin.cc3
-rw-r--r--paludis/repositories/e/ebin_entries.cc2
-rw-r--r--paludis/repositories/e/ebuild.cc5
-rw-r--r--paludis/repositories/e/ebuild_entries.cc4
-rw-r--r--paludis/repositories/e/ebuild_flat_metadata_cache.cc1
-rw-r--r--paludis/repositories/e/ebuild_id.cc2
-rw-r--r--paludis/repositories/e/eclass_mtimes.cc3
-rw-r--r--paludis/repositories/e/exheres_layout.cc12
-rw-r--r--paludis/repositories/e/fetch_visitor_TEST.cc1
-rw-r--r--paludis/repositories/e/glsa.cc9
-rw-r--r--paludis/repositories/e/glsa.hh8
-rw-r--r--paludis/repositories/e/make_ebin_repository.cc5
-rw-r--r--paludis/repositories/e/make_ebuild_repository.cc5
-rw-r--r--paludis/repositories/e/manifest2_reader.cc13
-rw-r--r--paludis/repositories/e/manifest2_reader.hh3
-rw-r--r--paludis/repositories/e/registration.cc3
-rw-r--r--paludis/repositories/e/source_uri_finder.hh5
-rw-r--r--paludis/repositories/e/source_uri_finder_TEST.cc1
-rw-r--r--paludis/repositories/e/traditional_layout.cc12
-rw-r--r--paludis/repositories/e/use_desc.cc3
-rw-r--r--paludis/repositories/e/vdb_merger.cc3
-rw-r--r--paludis/repositories/e/vdb_repository.cc9
-rw-r--r--paludis/repositories/e/vdb_repository_TEST.cc2
-rw-r--r--paludis/repositories/e/vdb_unmerger.cc4
53 files changed, 130 insertions, 165 deletions
diff --git a/paludis/repositories/e/aa_visitor.cc b/paludis/repositories/e/aa_visitor.cc
index 4bf69d3b0..119fbb7d9 100644
--- a/paludis/repositories/e/aa_visitor.cc
+++ b/paludis/repositories/e/aa_visitor.cc
@@ -21,7 +21,7 @@
#include <paludis/repositories/e/aa_visitor.hh>
#include <paludis/util/visitor-impl.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
+#include <paludis/util/wrapped_forward_iterator.hh>
/** \file
* Implementation of aa_visitor.hh
diff --git a/paludis/repositories/e/aa_visitor.hh b/paludis/repositories/e/aa_visitor.hh
index 18fa5e77f..7df1897cf 100644
--- a/paludis/repositories/e/aa_visitor.hh
+++ b/paludis/repositories/e/aa_visitor.hh
@@ -23,6 +23,7 @@
#include <paludis/dep_tree.hh>
#include <paludis/dep_spec-fwd.hh>
#include <paludis/util/private_implementation_pattern.hh>
+#include <paludis/util/wrapped_forward_iterator-fwd.hh>
/** \file
* Declarations for the AAVisitor class.
@@ -68,7 +69,7 @@ namespace paludis
/// \name Iterator functions
///{
- typedef libwrapiter::ForwardIterator<AAVisitor, const std::string> ConstIterator;
+ typedef WrappedForwardIterator<enum ConstIteratorTag { }, const std::string> ConstIterator;
ConstIterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
ConstIterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
diff --git a/paludis/repositories/e/aa_visitor_TEST.cc b/paludis/repositories/e/aa_visitor_TEST.cc
index 9dcf2b4a3..e1a319fe2 100644
--- a/paludis/repositories/e/aa_visitor_TEST.cc
+++ b/paludis/repositories/e/aa_visitor_TEST.cc
@@ -22,7 +22,6 @@
#include <paludis/util/join.hh>
#include <paludis/util/visitor-impl.hh>
#include <paludis/repositories/e/eapi.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
#include <test/test_runner.hh>
#include <test/test_framework.hh>
diff --git a/paludis/repositories/e/dep_lexer.cc b/paludis/repositories/e/dep_lexer.cc
index 794f08dff..90c6a7cf0 100644
--- a/paludis/repositories/e/dep_lexer.cc
+++ b/paludis/repositories/e/dep_lexer.cc
@@ -19,22 +19,19 @@
#include <paludis/dep_spec.hh>
#include <paludis/repositories/e/dep_lexer.hh>
+#include <paludis/util/wrapped_forward_iterator-impl.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/exception.hh>
#include <paludis/util/tokeniser.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
#include <vector>
#include <list>
-/** \file
- * Implementation of dep_lexer.hh things.
- *
- * \ingroup grpdeplexer
- */
-
using namespace paludis;
using namespace paludis::erepository;
+template class WrappedForwardIterator<DepLexer::ConstIteratorTag,
+ const std::pair<DepLexerLexeme, std::string> >;
+
namespace paludis
{
/**
diff --git a/paludis/repositories/e/dep_lexer.hh b/paludis/repositories/e/dep_lexer.hh
index 7939a2a44..b274d7beb 100644
--- a/paludis/repositories/e/dep_lexer.hh
+++ b/paludis/repositories/e/dep_lexer.hh
@@ -23,10 +23,9 @@
#include <paludis/util/exception.hh>
#include <paludis/util/instantiation_policy.hh>
#include <paludis/util/private_implementation_pattern.hh>
+#include <paludis/util/wrapped_forward_iterator-fwd.hh>
#include <string>
-#include <libwrapiter/libwrapiter_forward_iterator-fwd.hh>
-
/** \file
* Declarations for the DepLexer class.
*
@@ -106,7 +105,7 @@ namespace paludis
///\name Iterate over our items
///\{
- typedef libwrapiter::ForwardIterator<DepLexer,
+ typedef WrappedForwardIterator<enum ConstIteratorTag { },
const std::pair<DepLexerLexeme, std::string> > ConstIterator;
ConstIterator begin() const;
diff --git a/paludis/repositories/e/dep_lexer_TEST.cc b/paludis/repositories/e/dep_lexer_TEST.cc
index 4be9c70b7..0300b1e07 100644
--- a/paludis/repositories/e/dep_lexer_TEST.cc
+++ b/paludis/repositories/e/dep_lexer_TEST.cc
@@ -18,10 +18,10 @@
*/
#include <paludis/repositories/e/dep_lexer.hh>
+#include <paludis/util/wrapped_forward_iterator.hh>
#include <sstream>
#include <test/test_framework.hh>
#include <test/test_runner.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
using namespace test;
using namespace paludis;
diff --git a/paludis/repositories/e/dep_parser.cc b/paludis/repositories/e/dep_parser.cc
index 78ab15835..df96853b3 100644
--- a/paludis/repositories/e/dep_parser.cc
+++ b/paludis/repositories/e/dep_parser.cc
@@ -27,8 +27,7 @@
#include <paludis/util/tr1_functional.hh>
#include <paludis/util/visitor-impl.hh>
#include <paludis/util/make_shared_ptr.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-#include <libwrapiter/libwrapiter_output_iterator.hh>
+#include <paludis/util/iterator_funcs.hh>
#include <stack>
#include <set>
diff --git a/paludis/repositories/e/dep_parser_TEST.cc b/paludis/repositories/e/dep_parser_TEST.cc
index 6a4243988..3d9fb10ab 100644
--- a/paludis/repositories/e/dep_parser_TEST.cc
+++ b/paludis/repositories/e/dep_parser_TEST.cc
@@ -22,7 +22,6 @@
#include <paludis/repositories/e/eapi.hh>
#include <paludis/util/visitor-impl.hh>
#include <paludis/stringify_formatter.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
#include <sstream>
#include <test/test_framework.hh>
#include <test/test_runner.hh>
diff --git a/paludis/repositories/e/dep_spec_pretty_printer.cc b/paludis/repositories/e/dep_spec_pretty_printer.cc
index 6d2b0c873..c7132e361 100644
--- a/paludis/repositories/e/dep_spec_pretty_printer.cc
+++ b/paludis/repositories/e/dep_spec_pretty_printer.cc
@@ -30,7 +30,6 @@
#include <paludis/environment.hh>
#include <paludis/query.hh>
#include <paludis/package_database.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
/** \file
* Implementation of dep_spec_pretty_printer.hh.
diff --git a/paludis/repositories/e/dep_spec_pretty_printer_TEST.cc b/paludis/repositories/e/dep_spec_pretty_printer_TEST.cc
index a9b13352f..203d3d22b 100644
--- a/paludis/repositories/e/dep_spec_pretty_printer_TEST.cc
+++ b/paludis/repositories/e/dep_spec_pretty_printer_TEST.cc
@@ -22,7 +22,6 @@
#include <paludis/repositories/e/eapi.hh>
#include <paludis/stringify_formatter.hh>
#include <paludis/util/visitor-impl.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
#include <test/test_runner.hh>
#include <test/test_framework.hh>
diff --git a/paludis/repositories/e/e_key.cc b/paludis/repositories/e/e_key.cc
index b59581831..2d8caef0a 100644
--- a/paludis/repositories/e/e_key.cc
+++ b/paludis/repositories/e/e_key.cc
@@ -27,7 +27,6 @@
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/tokeniser.hh>
-#include <paludis/util/iterator.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/log.hh>
#include <paludis/util/mutex.hh>
@@ -35,6 +34,7 @@
#include <paludis/util/tr1_functional.hh>
#include <paludis/util/join.hh>
#include <paludis/util/visitor-impl.hh>
+#include <paludis/util/create_iterator-impl.hh>
#include <paludis/contents.hh>
#include <paludis/repository.hh>
@@ -42,9 +42,6 @@
#include <paludis/stringify_formatter-impl.hh>
#include <paludis/dep_spec_flattener.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-#include <libwrapiter/libwrapiter_output_iterator.hh>
-
#include <list>
#include <vector>
#include <fstream>
@@ -1071,7 +1068,7 @@ ECTimeKey::~ECTimeKey()
{
}
-const time_t
+time_t
ECTimeKey::value() const
{
Lock l(_imp->value_mutex);
diff --git a/paludis/repositories/e/e_key.hh b/paludis/repositories/e/e_key.hh
index 4bd3b37d8..054446ecb 100644
--- a/paludis/repositories/e/e_key.hh
+++ b/paludis/repositories/e/e_key.hh
@@ -323,7 +323,7 @@ namespace paludis
const std::string &, const std::string &, const FSEntry &, const MetadataKeyType);
~ECTimeKey();
- const time_t value() const
+ time_t value() const
PALUDIS_ATTRIBUTE((warn_unused_result));
};
diff --git a/paludis/repositories/e/e_mask.cc b/paludis/repositories/e/e_mask.cc
index 9bb340518..06623f30e 100644
--- a/paludis/repositories/e/e_mask.cc
+++ b/paludis/repositories/e/e_mask.cc
@@ -50,7 +50,7 @@ EUnacceptedMask::~EUnacceptedMask()
{
}
-const char
+char
EUnacceptedMask::key() const
{
return _imp->key;
@@ -95,7 +95,7 @@ EUnsupportedMask::~EUnsupportedMask()
{
}
-const char
+char
EUnsupportedMask::key() const
{
return _imp->key;
@@ -142,7 +142,7 @@ ERepositoryMask::~ERepositoryMask()
{
}
-const char
+char
ERepositoryMask::key() const
{
return _imp->key;
diff --git a/paludis/repositories/e/e_mask.hh b/paludis/repositories/e/e_mask.hh
index 27bc51ebf..5d34d62bf 100644
--- a/paludis/repositories/e/e_mask.hh
+++ b/paludis/repositories/e/e_mask.hh
@@ -35,7 +35,7 @@ namespace paludis
EUnacceptedMask(const char, const std::string &, const tr1::shared_ptr<const MetadataKey> &);
~EUnacceptedMask();
- const char key() const;
+ char key() const;
const std::string description() const;
const tr1::shared_ptr<const MetadataKey> unaccepted_key() const;
};
@@ -48,7 +48,7 @@ namespace paludis
EUnsupportedMask(const char, const std::string &, const std::string &);
~EUnsupportedMask();
- virtual const char key() const;
+ virtual char key() const;
virtual const std::string description() const;
virtual const std::string explanation() const;
};
@@ -61,7 +61,7 @@ namespace paludis
ERepositoryMask(const char, const std::string &, const tr1::shared_ptr<const MetadataKey> &);
~ERepositoryMask();
- const char key() const;
+ virtual char key() const;
const std::string description() const;
const tr1::shared_ptr<const MetadataKey> mask_key() const;
};
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index 1123ae202..7cb1fd027 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -39,6 +39,7 @@
#include <paludis/repository_info.hh>
#include <paludis/util/config_file.hh>
+#include <paludis/util/create_iterator-impl.hh>
#include <paludis/distribution.hh>
#include <paludis/dep_spec.hh>
#include <paludis/environment.hh>
@@ -53,12 +54,12 @@
#include <paludis/qa.hh>
#include <paludis/util/fs_entry.hh>
-#include <paludis/util/iterator.hh>
#include <paludis/util/log.hh>
#include <paludis/util/random.hh>
#include <paludis/util/options.hh>
#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/stringify.hh>
+#include <paludis/util/iterator_funcs.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/map.hh>
@@ -74,9 +75,6 @@
#include <paludis/rmd160.hh>
#include <paludis/sha256.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-#include <libwrapiter/libwrapiter_output_iterator.hh>
-
#include <map>
#include <set>
#include <functional>
@@ -702,9 +700,8 @@ ERepository::info(bool verbose) const
{
using namespace tr1::placeholders;
std::set<VersionSpec> versions;
- std::copy(q->begin(), q->end(),
- transform_inserter(std::inserter(versions, versions.begin()),
- tr1::bind<const VersionSpec>(tr1::mem_fn(&PackageID::version), _1)));
+ std::transform(q->begin(), q->end(), std::inserter(versions, versions.begin()),
+ tr1::bind<const VersionSpec>(tr1::mem_fn(&PackageID::version), _1));
package_info->add_kv(*i, join(versions.begin(), versions.end(), ", "));
}
}
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index bf7560466..13ee7f1fa 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -35,8 +35,6 @@
#include <paludis/query.hh>
#include <paludis/action.hh>
#include <paludis/stringify_formatter.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-#include <libwrapiter/libwrapiter_output_iterator.hh>
#include <test/test_framework.hh>
#include <test/test_runner.hh>
diff --git a/paludis/repositories/e/e_repository_mask_file.cc b/paludis/repositories/e/e_repository_mask_file.cc
index 6bafed6d6..f681af7c0 100644
--- a/paludis/repositories/e/e_repository_mask_file.cc
+++ b/paludis/repositories/e/e_repository_mask_file.cc
@@ -21,18 +21,20 @@
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/options.hh>
#include <paludis/util/sequence.hh>
+#include <paludis/util/wrapped_forward_iterator-impl.hh>
#include <paludis/util/strip.hh>
#include <paludis/util/config_file.hh>
+#include <paludis/util/wrapped_output_iterator.hh>
#include <paludis/mask.hh>
-#include <libwrapiter/libwrapiter_forward_iterator-impl.hh>
-#include <libwrapiter/libwrapiter_output_iterator-impl.hh>
-
#include <list>
using namespace paludis;
using namespace paludis::erepository;
+template class WrappedForwardIterator<MaskFile::ConstIteratorTag,
+ const std::pair<const std::string, tr1::shared_ptr<const RepositoryMaskInfo> > >;
+
namespace paludis
{
template <>
diff --git a/paludis/repositories/e/e_repository_mask_file.hh b/paludis/repositories/e/e_repository_mask_file.hh
index bc200b9ba..80d167faf 100644
--- a/paludis/repositories/e/e_repository_mask_file.hh
+++ b/paludis/repositories/e/e_repository_mask_file.hh
@@ -26,8 +26,6 @@
#include <paludis/util/config_file.hh>
#include <paludis/mask-fwd.hh>
-#include <libwrapiter/libwrapiter_forward_iterator-fwd.hh>
-
namespace paludis
{
namespace erepository
@@ -54,7 +52,7 @@ namespace paludis
///\name Iterate over our mask lines.
///\{
- typedef libwrapiter::ForwardIterator<MaskFile,
+ typedef WrappedForwardIterator<enum ConstIteratorTag { },
const std::pair<const std::string, tr1::shared_ptr<const RepositoryMaskInfo> > > ConstIterator;
ConstIterator begin() const;
ConstIterator end() const;
diff --git a/paludis/repositories/e/e_repository_news.cc b/paludis/repositories/e/e_repository_news.cc
index 37c2cecdd..45dbb3893 100644
--- a/paludis/repositories/e/e_repository_news.cc
+++ b/paludis/repositories/e/e_repository_news.cc
@@ -29,8 +29,8 @@
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/options.hh>
+#include <paludis/util/wrapped_forward_iterator-impl.hh>
#include <paludis/query.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
#include <set>
#include <ostream>
@@ -39,6 +39,10 @@
using namespace paludis;
+template class WrappedForwardIterator<NewsFile::DisplayIfInstalledConstIteratorTag, const std::string>;
+template class WrappedForwardIterator<NewsFile::DisplayIfKeywordConstIteratorTag, const std::string>;
+template class WrappedForwardIterator<NewsFile::DisplayIfProfileConstIteratorTag, const std::string>;
+
namespace paludis
{
/**
diff --git a/paludis/repositories/e/e_repository_news.hh b/paludis/repositories/e/e_repository_news.hh
index 3f25770cb..8cade35ee 100644
--- a/paludis/repositories/e/e_repository_news.hh
+++ b/paludis/repositories/e/e_repository_news.hh
@@ -23,6 +23,7 @@
#include <paludis/util/private_implementation_pattern.hh>
#include <paludis/util/instantiation_policy.hh>
#include <paludis/util/config_file.hh>
+#include <paludis/util/wrapped_forward_iterator-fwd.hh>
/** \file
* Declaration for the ERepositoryNews class.
@@ -84,10 +85,7 @@ namespace paludis
///\name Iterate over our Display-If-Installed headers
///\{
- /// Tag for DisplayIfInstalledConstIterator.
- struct DisplayIfInstalledConstIteratorTag;
-
- typedef libwrapiter::ForwardIterator<DisplayIfInstalledConstIteratorTag,
+ typedef WrappedForwardIterator<enum DisplayIfInstalledConstIteratorTag { },
const std::string> DisplayIfInstalledConstIterator;
DisplayIfInstalledConstIterator begin_display_if_installed() const;
@@ -99,10 +97,7 @@ namespace paludis
///\name Iterate over our Display-If-Keyword headers
///\{
- /// Tag for DisplayIfKeywordConstIterator.
- struct DisplayIfKeywordConstIteratorTag;
-
- typedef libwrapiter::ForwardIterator<DisplayIfKeywordConstIteratorTag,
+ typedef WrappedForwardIterator<enum DisplayIfKeywordConstIteratorTag { },
const std::string> DisplayIfKeywordConstIterator;
DisplayIfKeywordConstIterator begin_display_if_keyword() const;
@@ -114,10 +109,7 @@ namespace paludis
///\name Iterate over our Display-If-Profile headers
///\{
- /// Tag for DisplayIfProfileConstIterator.
- struct DisplayIfProfileConstIteratorTag;
-
- typedef libwrapiter::ForwardIterator<DisplayIfProfileConstIteratorTag,
+ typedef WrappedForwardIterator<enum DisplayIfProfileConstIteratorTag { },
const std::string> DisplayIfProfileConstIterator;
DisplayIfProfileConstIterator begin_display_if_profile() const;
diff --git a/paludis/repositories/e/e_repository_profile.cc b/paludis/repositories/e/e_repository_profile.cc
index cdf885e9c..5d684bc5d 100644
--- a/paludis/repositories/e/e_repository_profile.cc
+++ b/paludis/repositories/e/e_repository_profile.cc
@@ -27,13 +27,15 @@
#include <paludis/util/log.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/iterator.hh>
#include <paludis/util/save.hh>
#include <paludis/util/system.hh>
+#include <paludis/util/wrapped_forward_iterator-impl.hh>
#include <paludis/util/join.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/set.hh>
#include <paludis/util/options.hh>
+#include <paludis/util/iterator_funcs.hh>
+#include <paludis/util/create_iterator-impl.hh>
#include <paludis/util/config_file.hh>
#include <paludis/dep_tag.hh>
#include <paludis/environment.hh>
@@ -42,8 +44,6 @@
#include <paludis/distribution.hh>
#include <paludis/package_id.hh>
#include <paludis/metadata_key.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-#include <libwrapiter/libwrapiter_output_iterator.hh>
#include <list>
#include <algorithm>
@@ -55,12 +55,17 @@
using namespace paludis;
+template class WrappedForwardIterator<ERepositoryProfile::UseExpandConstIteratorTag, const UseFlagName>;
+template class WrappedForwardIterator<ERepositoryProfile::VirtualsConstIteratorTag,
+ const std::pair<const QualifiedPackageName, tr1::shared_ptr<const PackageDepSpec> > >;
+
namespace
{
typedef MakeHashedSet<UseFlagName>::Type UseFlagSet;
typedef MakeHashedMap<std::string, std::string>::Type EnvironmentVariablesMap;
typedef MakeHashedMap<QualifiedPackageName, tr1::shared_ptr<const PackageDepSpec> >::Type VirtualsMap;
- typedef MakeHashedMap<QualifiedPackageName, std::list<std::pair<tr1::shared_ptr<const PackageDepSpec>, tr1::shared_ptr<const RepositoryMaskInfo> > > >::Type PackageMaskMap;
+ typedef MakeHashedMap<QualifiedPackageName,
+ std::list<std::pair<tr1::shared_ptr<const PackageDepSpec>, tr1::shared_ptr<const RepositoryMaskInfo> > > >::Type PackageMaskMap;
typedef MakeHashedMap<UseFlagName, bool>::Type FlagStatusMap;
typedef std::list<std::pair<tr1::shared_ptr<const PackageDepSpec>, FlagStatusMap> > PackageFlagStatusMapList;
diff --git a/paludis/repositories/e/e_repository_profile.hh b/paludis/repositories/e/e_repository_profile.hh
index db44b196b..e0fb8bfa6 100644
--- a/paludis/repositories/e/e_repository_profile.hh
+++ b/paludis/repositories/e/e_repository_profile.hh
@@ -29,8 +29,6 @@
#include <paludis/util/fs_entry-fwd.hh>
#include <paludis/util/private_implementation_pattern.hh>
#include <paludis/util/instantiation_policy.hh>
-
-#include <libwrapiter/libwrapiter_forward_iterator-fwd.hh>
#include <string>
/** \file
@@ -85,7 +83,7 @@ namespace paludis
///\name Iterate over USE_EXPAND, USE_EXPAND_HIDDEN
///\{
- typedef libwrapiter::ForwardIterator<ERepositoryProfile, const UseFlagName> UseExpandConstIterator;
+ typedef WrappedForwardIterator<enum UseExpandConstIteratorTag { }, const UseFlagName> UseExpandConstIterator;
UseExpandConstIterator begin_use_expand() const;
UseExpandConstIterator end_use_expand() const;
@@ -119,7 +117,7 @@ namespace paludis
///\name Virtuals
///\{
- typedef libwrapiter::ForwardIterator<ERepositoryProfile,
+ typedef WrappedForwardIterator<enum VirtualsConstIteratorTag { },
const std::pair<const QualifiedPackageName, tr1::shared_ptr<const PackageDepSpec> > > VirtualsConstIterator;
VirtualsConstIterator begin_virtuals() const;
diff --git a/paludis/repositories/e/e_repository_profile_file.cc b/paludis/repositories/e/e_repository_profile_file.cc
index a05d27756..0be48f9c6 100644
--- a/paludis/repositories/e/e_repository_profile_file.cc
+++ b/paludis/repositories/e/e_repository_profile_file.cc
@@ -23,11 +23,10 @@
#include <paludis/util/log.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/config_file.hh>
+#include <paludis/util/wrapped_forward_iterator-impl.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/options.hh>
#include <paludis/mask.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-#include <libwrapiter/libwrapiter_output_iterator.hh>
#include <list>
#include <algorithm>
@@ -37,18 +36,21 @@ using namespace paludis::erepository;
namespace
{
template <typename T_>
- struct FileEntryTraits
+ struct FileEntryTraits;
+
+ template<>
+ struct FileEntryTraits<std::string>
{
- static const T_ & extract_key(const T_ & k)
+ static const std::string extract_key(const std::string & k)
{
return k;
}
};
template <typename F_, typename S_>
- struct FileEntryTraits<const std::pair<F_, S_> >
+ struct FileEntryTraits<std::pair<F_, S_> >
{
- static const F_ & extract_key(const std::pair<F_, S_> & p)
+ static const std::string extract_key(const std::pair<F_, S_> & p)
{
return p.first;
}
@@ -67,7 +69,7 @@ namespace
template <typename U_>
bool operator() (const U_ & y)
{
- return FileEntryTraits<const U_>::extract_key(y) == _x;
+ return FileEntryTraits<U_>::extract_key(y) == _x;
}
};
}
@@ -77,7 +79,8 @@ namespace paludis
template <typename F_>
struct Implementation<ProfileFile<F_> >
{
- typedef std::list<typename tr1::remove_const<typename F_::ConstIterator::value_type>::type> Lines;
+ typedef std::list<typename tr1::remove_const<typename tr1::remove_reference<
+ typename F_::ConstIterator::value_type>::type>::type> Lines;
Lines lines;
};
}
@@ -94,7 +97,8 @@ ProfileFile<F_>::add_file(const FSEntry & f)
F_ file(f, LineConfigFileOptions());
for (typename F_::ConstIterator line(file.begin()), line_end(file.end()) ; line != line_end ; ++line)
{
- const std::string & key(FileEntryTraits<typename F_::ConstIterator::value_type>::extract_key(*line));
+ const std::string & key(FileEntryTraits<typename tr1::remove_const<typename tr1::remove_reference<
+ typename F_::ConstIterator::value_type>::type>::type>::extract_key(*line));
if (0 == key.compare(0, 1, "-", 0, 1))
{
typename Implementation<ProfileFile>::Lines::iterator i(
@@ -141,5 +145,8 @@ ProfileFile<F_>::end() const
}
template class ProfileFile<LineConfigFile>;
+template class WrappedForwardIterator<ProfileFile<LineConfigFile>::ConstIteratorTag, LineConfigFile::ConstIterator::value_type>;
+
template class ProfileFile<MaskFile>;
+template class WrappedForwardIterator<ProfileFile<MaskFile>::ConstIteratorTag, MaskFile::ConstIterator::value_type>;
diff --git a/paludis/repositories/e/e_repository_profile_file.hh b/paludis/repositories/e/e_repository_profile_file.hh
index ddf967b97..9bf0efe40 100644
--- a/paludis/repositories/e/e_repository_profile_file.hh
+++ b/paludis/repositories/e/e_repository_profile_file.hh
@@ -23,8 +23,8 @@
#include <paludis/util/private_implementation_pattern.hh>
#include <paludis/util/attributes.hh>
#include <paludis/util/fs_entry.hh>
+#include <paludis/util/wrapped_forward_iterator-fwd.hh>
#include <paludis/mask-fwd.hh>
-#include <libwrapiter/libwrapiter_forward_iterator-fwd.hh>
namespace paludis
{
@@ -58,7 +58,7 @@ namespace paludis
///\name Iterate over our profile lines.
///\{
- typedef libwrapiter::ForwardIterator<ProfileFile, typename F_::ConstIterator::value_type> ConstIterator;
+ typedef WrappedForwardIterator<enum ConstIteratorTag { }, typename F_::ConstIterator::value_type> ConstIterator;
ConstIterator begin() const;
ConstIterator end() const;
diff --git a/paludis/repositories/e/e_repository_sets.cc b/paludis/repositories/e/e_repository_sets.cc
index 36f8ebdc2..70f86087e 100644
--- a/paludis/repositories/e/e_repository_sets.cc
+++ b/paludis/repositories/e/e_repository_sets.cc
@@ -35,6 +35,7 @@
#include <paludis/util/fs_entry.hh>
#include <paludis/util/is_file_with_extension.hh>
#include <paludis/util/log.hh>
+#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/strip.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/tokeniser.hh>
@@ -46,9 +47,6 @@
#include <map>
#include <set>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-#include <libwrapiter/libwrapiter_output_iterator.hh>
-
#include "config.h"
using namespace paludis;
@@ -133,8 +131,11 @@ ERepositorySets::sets_list() const
using namespace tr1::placeholders;
std::list<FSEntry> repo_sets;
- std::copy(DirIterator(_imp->params.setsdir), DirIterator(),
- filter_inserter(std::back_inserter(repo_sets), tr1::bind(is_file_with_extension, _1, ".conf", IsFileWithOptions())));
+ std::remove_copy_if(
+ DirIterator(_imp->params.setsdir),
+ DirIterator(),
+ std::back_inserter(repo_sets),
+ tr1::bind(std::logical_not<bool>(), tr1::bind(is_file_with_extension, _1, ".conf", IsFileWithOptions())));
std::list<FSEntry>::const_iterator f(repo_sets.begin()),
f_end(repo_sets.end());
diff --git a/paludis/repositories/e/e_repository_sets_TEST.cc b/paludis/repositories/e/e_repository_sets_TEST.cc
index 460b2d93c..f9cc03951 100644
--- a/paludis/repositories/e/e_repository_sets_TEST.cc
+++ b/paludis/repositories/e/e_repository_sets_TEST.cc
@@ -29,8 +29,6 @@
#include <paludis/stringify_formatter.hh>
#include <test/test_framework.hh>
#include <test/test_runner.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-#include <libwrapiter/libwrapiter_output_iterator.hh>
#include "config.h"
using namespace test;
diff --git a/paludis/repositories/e/eapi.cc b/paludis/repositories/e/eapi.cc
index 4cbe39167..94dbe445b 100644
--- a/paludis/repositories/e/eapi.cc
+++ b/paludis/repositories/e/eapi.cc
@@ -33,12 +33,11 @@
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/instantiation_policy-impl.hh>
#include <paludis/util/config_file.hh>
+#include <paludis/util/wrapped_output_iterator.hh>
#include <map>
#include <vector>
-#include <libwrapiter/libwrapiter_output_iterator.hh>
-
using namespace paludis;
using namespace paludis::erepository;
diff --git a/paludis/repositories/e/eapi_phase.cc b/paludis/repositories/e/eapi_phase.cc
index 3df4ab394..936dae706 100644
--- a/paludis/repositories/e/eapi_phase.cc
+++ b/paludis/repositories/e/eapi_phase.cc
@@ -21,10 +21,10 @@
#include <paludis/repositories/e/eapi.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/iterator.hh>
#include <paludis/util/make_shared_ptr.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-#include <libwrapiter/libwrapiter_output_iterator.hh>
+#include <paludis/util/iterator_funcs.hh>
+#include <paludis/util/wrapped_forward_iterator-impl.hh>
+#include <paludis/util/indirect_iterator-impl.hh>
#include <set>
#include <algorithm>
#include <list>
@@ -32,6 +32,9 @@
using namespace paludis;
using namespace paludis::erepository;
+template class WrappedForwardIterator<EAPIPhase::ConstIteratorTag, const std::string>;
+template class WrappedForwardIterator<EAPIPhases::ConstIteratorTag, const EAPIPhase>;
+
namespace paludis
{
template <>
diff --git a/paludis/repositories/e/eapi_phase.hh b/paludis/repositories/e/eapi_phase.hh
index 5138a808f..2ad74eada 100644
--- a/paludis/repositories/e/eapi_phase.hh
+++ b/paludis/repositories/e/eapi_phase.hh
@@ -21,7 +21,7 @@
#define PALUDIS_GUARD_PALUDIS_REPOSITORIES_GENTOO_EAPI_PHASE_HH 1
#include <paludis/util/private_implementation_pattern.hh>
-#include <libwrapiter/libwrapiter_forward_iterator-fwd.hh>
+#include <paludis/util/wrapped_forward_iterator-fwd.hh>
#include <string>
namespace paludis
@@ -53,7 +53,7 @@ namespace paludis
bool option(const std::string &) const;
bool option_contains(const std::string &, const std::string &) const;
- typedef libwrapiter::ForwardIterator<EAPIPhase, const std::string> ConstIterator;
+ typedef WrappedForwardIterator<enum ConstIteratorTag { }, const std::string> ConstIterator;
ConstIterator begin_commands() const;
ConstIterator end_commands() const;
@@ -82,7 +82,7 @@ namespace paludis
///\name Information about the phases
///\{
- typedef libwrapiter::ForwardIterator<EAPIPhases, const EAPIPhase> ConstIterator;
+ typedef WrappedForwardIterator<enum ConstIteratorTag { }, const EAPIPhase> ConstIterator;
ConstIterator begin_phases() const;
ConstIterator end_phases() const;
diff --git a/paludis/repositories/e/ebin.cc b/paludis/repositories/e/ebin.cc
index b48813728..9c95df020 100644
--- a/paludis/repositories/e/ebin.cc
+++ b/paludis/repositories/e/ebin.cc
@@ -21,6 +21,7 @@
#include <paludis/repositories/e/dep_parser.hh>
#include <paludis/repositories/e/eapi.hh>
#include <paludis/environment.hh>
+#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/system.hh>
#include <paludis/util/log.hh>
#include <paludis/util/strip.hh>
@@ -31,8 +32,6 @@
#include <paludis/metadata_key.hh>
#include <sys/resource.h>
#include <sys/time.h>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-#include <libwrapiter/libwrapiter_output_iterator.hh>
#include <unistd.h>
using namespace paludis;
diff --git a/paludis/repositories/e/ebin_entries.cc b/paludis/repositories/e/ebin_entries.cc
index 2bea89f4b..7893c4fd2 100644
--- a/paludis/repositories/e/ebin_entries.cc
+++ b/paludis/repositories/e/ebin_entries.cc
@@ -35,8 +35,6 @@
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/is_file_with_extension.hh>
#include <paludis/util/visitor-impl.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-#include <libwrapiter/libwrapiter_output_iterator.hh>
#include <set>
#include <fstream>
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc
index 026aff393..8715eacfe 100644
--- a/paludis/repositories/e/ebuild.cc
+++ b/paludis/repositories/e/ebuild.cc
@@ -32,6 +32,8 @@
#include <paludis/util/map.hh>
#include <paludis/util/join.hh>
#include <paludis/util/tokeniser.hh>
+#include <paludis/util/wrapped_forward_iterator.hh>
+#include <paludis/util/wrapped_output_iterator.hh>
#include <paludis/about.hh>
#include <paludis/environment.hh>
@@ -44,9 +46,6 @@
#include <sys/time.h>
#include <unistd.h>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-#include <libwrapiter/libwrapiter_output_iterator.hh>
-
#include <list>
#include "config.h"
diff --git a/paludis/repositories/e/ebuild_entries.cc b/paludis/repositories/e/ebuild_entries.cc
index 4999ba161..5374be892 100644
--- a/paludis/repositories/e/ebuild_entries.cc
+++ b/paludis/repositories/e/ebuild_entries.cc
@@ -40,6 +40,7 @@
#include <paludis/util/tokeniser.hh>
#include <paludis/util/map.hh>
#include <paludis/util/system.hh>
+#include <paludis/util/create_iterator-impl.hh>
#include <paludis/util/set.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
@@ -47,9 +48,6 @@
#include <paludis/util/visitor-impl.hh>
#include <paludis/util/tr1_functional.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-#include <libwrapiter/libwrapiter_output_iterator.hh>
-
#include <fstream>
#include <list>
#include <set>
diff --git a/paludis/repositories/e/ebuild_flat_metadata_cache.cc b/paludis/repositories/e/ebuild_flat_metadata_cache.cc
index 56d54b980..824edc2fe 100644
--- a/paludis/repositories/e/ebuild_flat_metadata_cache.cc
+++ b/paludis/repositories/e/ebuild_flat_metadata_cache.cc
@@ -27,7 +27,6 @@
#include <paludis/stringify_formatter.hh>
#include <paludis/repositories/e/eapi.hh>
#include <paludis/util/tr1_functional.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
#include <fstream>
#include <set>
#include <list>
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index ccecb088f..d116e95b0 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -43,8 +43,6 @@
#include <paludis/util/make_shared_ptr.hh>
#include <paludis/util/save.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-
#include <iterator>
#include <fstream>
diff --git a/paludis/repositories/e/eclass_mtimes.cc b/paludis/repositories/e/eclass_mtimes.cc
index a1d613dc7..40303c247 100644
--- a/paludis/repositories/e/eclass_mtimes.cc
+++ b/paludis/repositories/e/eclass_mtimes.cc
@@ -23,8 +23,7 @@
#include <paludis/util/sequence.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/mutex.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-#include <libwrapiter/libwrapiter_output_iterator.hh>
+#include <paludis/util/wrapped_forward_iterator.hh>
using namespace paludis;
diff --git a/paludis/repositories/e/exheres_layout.cc b/paludis/repositories/e/exheres_layout.cc
index 386323f97..b19550499 100644
--- a/paludis/repositories/e/exheres_layout.cc
+++ b/paludis/repositories/e/exheres_layout.cc
@@ -25,6 +25,7 @@
#include <paludis/hashed_containers.hh>
#include <paludis/package_id.hh>
#include <paludis/package_database.hh>
+#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/dir_iterator.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
@@ -34,12 +35,11 @@
#include <paludis/util/mutex.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/is_file_with_extension.hh>
-#include <paludis/util/iterator.hh>
+#include <paludis/util/wrapped_output_iterator.hh>
#include <paludis/util/strip.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/set.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-#include <libwrapiter/libwrapiter_output_iterator.hh>
+#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/tr1_functional.hh>
#include <functional>
@@ -274,9 +274,9 @@ ExheresLayout::need_category_names_collection() const
need_category_names();
_imp->category_names_collection.reset(new CategoryNamePartSet);
- std::copy(_imp->category_names.begin(), _imp->category_names.end(),
- transform_inserter(_imp->category_names_collection->inserter(),
- tr1::mem_fn(&std::pair<const CategoryNamePart, bool>::first)));
+ std::transform(_imp->category_names.begin(), _imp->category_names.end(),
+ _imp->category_names_collection->inserter(),
+ tr1::mem_fn(&std::pair<const CategoryNamePart, bool>::first));
}
tr1::shared_ptr<const CategoryNamePartSet>
diff --git a/paludis/repositories/e/fetch_visitor_TEST.cc b/paludis/repositories/e/fetch_visitor_TEST.cc
index 815508bc3..488fb40d6 100644
--- a/paludis/repositories/e/fetch_visitor_TEST.cc
+++ b/paludis/repositories/e/fetch_visitor_TEST.cc
@@ -29,7 +29,6 @@
#include <paludis/query.hh>
#include <test/test_runner.hh>
#include <test/test_framework.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
#include <fstream>
#include <iterator>
diff --git a/paludis/repositories/e/glsa.cc b/paludis/repositories/e/glsa.cc
index 3eb97b778..48dc251cc 100644
--- a/paludis/repositories/e/glsa.cc
+++ b/paludis/repositories/e/glsa.cc
@@ -18,12 +18,11 @@
*/
#include "glsa.hh"
-#include <paludis/util/iterator.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/mutex.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-#include <libwrapiter/libwrapiter_output_iterator.hh>
+#include <paludis/util/wrapped_forward_iterator-impl.hh>
+#include <paludis/util/indirect_iterator-impl.hh>
#include <list>
#include <dlfcn.h>
#include <stdint.h>
@@ -33,6 +32,10 @@
using namespace paludis;
+template class WrappedForwardIterator<GLSAPackage::ArchsConstIteratorTag, const UseFlagName>;
+template class WrappedForwardIterator<GLSAPackage::RangesConstIteratorTag, const GLSARange>;
+template class WrappedForwardIterator<GLSA::PackagesConstIteratorTag, const GLSAPackage>;
+
#include "glsa-sr.cc"
#ifdef MONOLITHIC
diff --git a/paludis/repositories/e/glsa.hh b/paludis/repositories/e/glsa.hh
index aa758dbf6..3182c51ec 100644
--- a/paludis/repositories/e/glsa.hh
+++ b/paludis/repositories/e/glsa.hh
@@ -23,9 +23,9 @@
#include <paludis/util/private_implementation_pattern.hh>
#include <paludis/util/sr.hh>
#include <paludis/util/tr1_memory.hh>
+#include <paludis/util/wrapped_forward_iterator-fwd.hh>
#include <paludis/name.hh>
#include <paludis/version_spec.hh>
-#include <libwrapiter/libwrapiter_forward_iterator-fwd.hh>
#include <string>
@@ -75,7 +75,7 @@ namespace paludis
///\name Iterate over our archs.
///\{
- typedef libwrapiter::ForwardIterator<GLSAPackage, const UseFlagName> ArchsConstIterator;
+ typedef WrappedForwardIterator<enum ArchsConstIteratorTag { }, const UseFlagName> ArchsConstIterator;
ArchsConstIterator begin_archs() const;
ArchsConstIterator end_archs() const;
@@ -89,7 +89,7 @@ namespace paludis
///\name Iterate over our ranges.
///\{
- typedef libwrapiter::ForwardIterator<GLSAPackage, const GLSARange> RangesConstIterator;
+ typedef WrappedForwardIterator<enum RangesConstIteratorTag { }, const GLSARange> RangesConstIterator;
RangesConstIterator begin_unaffected() const;
RangesConstIterator end_unaffected() const;
RangesConstIterator begin_vulnerable() const;
@@ -139,7 +139,7 @@ namespace paludis
///\name Iterate over our packages.
///\{
- typedef libwrapiter::ForwardIterator<GLSA, const GLSAPackage> PackagesConstIterator;
+ typedef WrappedForwardIterator<enum PackagesConstIteratorTag { }, const GLSAPackage> PackagesConstIterator;
PackagesConstIterator begin_packages() const;
PackagesConstIterator end_packages() const;
diff --git a/paludis/repositories/e/make_ebin_repository.cc b/paludis/repositories/e/make_ebin_repository.cc
index 0e3cc266e..ccbf46ecf 100644
--- a/paludis/repositories/e/make_ebin_repository.cc
+++ b/paludis/repositories/e/make_ebin_repository.cc
@@ -23,11 +23,12 @@
#include <paludis/util/map.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/destringify.hh>
+#include <paludis/util/create_iterator-impl.hh>
+#include <paludis/util/wrapped_forward_iterator.hh>
+#include <paludis/util/wrapped_output_iterator.hh>
#include <paludis/repositories/e/e_repository_exceptions.hh>
#include <paludis/environment.hh>
#include <paludis/distribution.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-#include <libwrapiter/libwrapiter_output_iterator.hh>
using namespace paludis;
diff --git a/paludis/repositories/e/make_ebuild_repository.cc b/paludis/repositories/e/make_ebuild_repository.cc
index c0860ff3f..f3db9eca2 100644
--- a/paludis/repositories/e/make_ebuild_repository.cc
+++ b/paludis/repositories/e/make_ebuild_repository.cc
@@ -23,11 +23,12 @@
#include <paludis/util/map.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/destringify.hh>
+#include <paludis/util/create_iterator-impl.hh>
+#include <paludis/util/wrapped_forward_iterator.hh>
+#include <paludis/util/wrapped_output_iterator.hh>
#include <paludis/repositories/e/e_repository_exceptions.hh>
#include <paludis/environment.hh>
#include <paludis/distribution.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-#include <libwrapiter/libwrapiter_output_iterator.hh>
using namespace paludis;
diff --git a/paludis/repositories/e/manifest2_reader.cc b/paludis/repositories/e/manifest2_reader.cc
index 36d8ec255..6840d8b77 100644
--- a/paludis/repositories/e/manifest2_reader.cc
+++ b/paludis/repositories/e/manifest2_reader.cc
@@ -22,27 +22,22 @@
#include <paludis/util/config_file.hh>
#include <paludis/util/destringify.hh>
#include <paludis/util/fs_entry.hh>
-#include <paludis/util/iterator.hh>
#include <paludis/util/log.hh>
#include <paludis/util/options.hh>
+#include <paludis/util/create_iterator-impl.hh>
+#include <paludis/util/wrapped_forward_iterator-impl.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
#include <list>
#include <paludis/repositories/e/manifest2_entry-sr.cc>
-
-/** \file
- * Implementation of manifest2_reader.hh
- *
- * \ingroup grpmanifest2reader
- */
-
using namespace paludis;
using namespace paludis::erepository;
+template class WrappedForwardIterator<Manifest2Reader::ConstIteratorTag, const Manifest2Entry>;
+
namespace paludis
{
template<>
diff --git a/paludis/repositories/e/manifest2_reader.hh b/paludis/repositories/e/manifest2_reader.hh
index ba33e7654..02067deb1 100644
--- a/paludis/repositories/e/manifest2_reader.hh
+++ b/paludis/repositories/e/manifest2_reader.hh
@@ -24,6 +24,7 @@
#include <paludis/util/fs_entry-fwd.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/sr.hh>
+#include <paludis/util/wrapped_forward_iterator-fwd.hh>
#include <paludis/repositories/e/manifest2_entry-sr.hh>
@@ -72,7 +73,7 @@ namespace paludis
/// \name Iterator functions
- typedef libwrapiter::ForwardIterator<Manifest2Reader, const Manifest2Entry> ConstIterator;
+ typedef WrappedForwardIterator<enum ConstIteratorTag { }, const Manifest2Entry> ConstIterator;
ConstIterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
ConstIterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
diff --git a/paludis/repositories/e/registration.cc b/paludis/repositories/e/registration.cc
index a8e5dd832..452933037 100644
--- a/paludis/repositories/e/registration.cc
+++ b/paludis/repositories/e/registration.cc
@@ -22,9 +22,8 @@
#include <paludis/repositories/e/make_ebin_repository.hh>
#include <paludis/repositories/e/vdb_repository.hh>
#include <paludis/util/log.hh>
+#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/map.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-#include <libwrapiter/libwrapiter_output_iterator.hh>
#include "config.h"
using namespace paludis;
diff --git a/paludis/repositories/e/source_uri_finder.hh b/paludis/repositories/e/source_uri_finder.hh
index 86a2db070..c58ec1dab 100644
--- a/paludis/repositories/e/source_uri_finder.hh
+++ b/paludis/repositories/e/source_uri_finder.hh
@@ -23,12 +23,11 @@
#include <paludis/util/attributes.hh>
#include <paludis/util/private_implementation_pattern.hh>
#include <paludis/util/visitor.hh>
+#include <paludis/util/wrapped_forward_iterator-fwd.hh>
#include <paludis/dep_label.hh>
#include <paludis/environment-fwd.hh>
#include <paludis/repository-fwd.hh>
-#include <libwrapiter/libwrapiter_forward_iterator-fwd.hh>
-
namespace paludis
{
namespace erepository
@@ -51,7 +50,7 @@ namespace paludis
~SourceURIFinder();
- typedef libwrapiter::ForwardIterator<SourceURIFinder, const std::pair<std::string, std::string> > ConstIterator;
+ typedef WrappedForwardIterator<enum ConstIteratorTag { }, const std::pair<std::string, std::string> > ConstIterator;
ConstIterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
ConstIterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
diff --git a/paludis/repositories/e/source_uri_finder_TEST.cc b/paludis/repositories/e/source_uri_finder_TEST.cc
index 207f9b13a..b8b6fb6c0 100644
--- a/paludis/repositories/e/source_uri_finder_TEST.cc
+++ b/paludis/repositories/e/source_uri_finder_TEST.cc
@@ -22,7 +22,6 @@
#include <paludis/repositories/fake/fake_repository.hh>
#include <paludis/package_database.hh>
#include <paludis/util/visitor-impl.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
#include <test/test_runner.hh>
#include <test/test_framework.hh>
diff --git a/paludis/repositories/e/traditional_layout.cc b/paludis/repositories/e/traditional_layout.cc
index e51e1fe02..acad12782 100644
--- a/paludis/repositories/e/traditional_layout.cc
+++ b/paludis/repositories/e/traditional_layout.cc
@@ -28,13 +28,14 @@
#include <paludis/util/dir_iterator.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
+#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/log.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/is_file_with_extension.hh>
-#include <paludis/util/iterator.hh>
#include <paludis/util/map.hh>
#include <paludis/util/strip.hh>
#include <paludis/util/sequence.hh>
+#include <paludis/util/wrapped_output_iterator.hh>
#include <paludis/util/mutex.hh>
#include <paludis/util/set.hh>
@@ -43,9 +44,6 @@
#include <algorithm>
#include <list>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-#include <libwrapiter/libwrapiter_output_iterator.hh>
-
using namespace paludis;
using namespace paludis::erepository;
@@ -293,9 +291,9 @@ TraditionalLayout::need_category_names_collection() const
need_category_names();
_imp->category_names_collection.reset(new CategoryNamePartSet);
- std::copy(_imp->category_names.begin(), _imp->category_names.end(),
- transform_inserter(_imp->category_names_collection->inserter(),
- tr1::mem_fn(&std::pair<const CategoryNamePart, bool>::first)));
+ std::transform(_imp->category_names.begin(), _imp->category_names.end(),
+ _imp->category_names_collection->inserter(),
+ tr1::mem_fn(&std::pair<const CategoryNamePart, bool>::first));
}
tr1::shared_ptr<const CategoryNamePartSet>
diff --git a/paludis/repositories/e/use_desc.cc b/paludis/repositories/e/use_desc.cc
index ffb4c1153..7cbc2f04a 100644
--- a/paludis/repositories/e/use_desc.cc
+++ b/paludis/repositories/e/use_desc.cc
@@ -27,9 +27,8 @@
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/strip.hh>
+#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/config_file.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-#include <libwrapiter/libwrapiter_output_iterator.hh>
using namespace paludis;
diff --git a/paludis/repositories/e/vdb_merger.cc b/paludis/repositories/e/vdb_merger.cc
index 59d7c9f87..4e84302e9 100644
--- a/paludis/repositories/e/vdb_merger.cc
+++ b/paludis/repositories/e/vdb_merger.cc
@@ -21,6 +21,7 @@
#include <paludis/util/log.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/system.hh>
+#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/join.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/sequence.hh>
@@ -31,8 +32,6 @@
#include <paludis/md5.hh>
#include <paludis/environment.hh>
#include <paludis/package_database.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-#include <libwrapiter/libwrapiter_output_iterator.hh>
#include <fstream>
#include <iostream>
#include <iomanip>
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index b5ac4f349..9e7b29c40 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -56,7 +56,6 @@
#include <paludis/util/mutex.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/is_file_with_extension.hh>
-#include <paludis/util/iterator.hh>
#include <paludis/util/log.hh>
#include <paludis/util/pstream.hh>
#include <paludis/util/set.hh>
@@ -69,9 +68,6 @@
#include <paludis/util/tokeniser.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-#include <libwrapiter/libwrapiter_output_iterator.hh>
-
#include <fstream>
#include <functional>
#include <algorithm>
@@ -211,9 +207,8 @@ VDBRepository::category_names() const
tr1::shared_ptr<CategoryNamePartSet> result(new CategoryNamePartSet);
- std::copy(_imp->categories.begin(), _imp->categories.end(),
- transform_inserter(result->inserter(),
- tr1::mem_fn(&std::pair<const CategoryNamePart, tr1::shared_ptr<QualifiedPackageNameSet> >::first)));
+ std::transform(_imp->categories.begin(), _imp->categories.end(), result->inserter(),
+ tr1::mem_fn(&std::pair<const CategoryNamePart, tr1::shared_ptr<QualifiedPackageNameSet> >::first));
return result;
}
diff --git a/paludis/repositories/e/vdb_repository_TEST.cc b/paludis/repositories/e/vdb_repository_TEST.cc
index d6384b548..2564f71bd 100644
--- a/paludis/repositories/e/vdb_repository_TEST.cc
+++ b/paludis/repositories/e/vdb_repository_TEST.cc
@@ -29,8 +29,6 @@
#include <fstream>
#include <iterator>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-
using namespace test;
using namespace paludis;
diff --git a/paludis/repositories/e/vdb_unmerger.cc b/paludis/repositories/e/vdb_unmerger.cc
index ad9366b60..66949e09b 100644
--- a/paludis/repositories/e/vdb_unmerger.cc
+++ b/paludis/repositories/e/vdb_unmerger.cc
@@ -32,15 +32,13 @@ using namespace paludis;
#include <paludis/repositories/e/vdb_unmerger-sr.cc>
#include <paludis/util/dir_iterator.hh>
#include <paludis/util/join.hh>
+#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/log.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/strip.hh>
-#include <libwrapiter/libwrapiter_forward_iterator.hh>
-#include <libwrapiter/libwrapiter_output_iterator.hh>
-
#include <list>
#include <map>
#include <vector>