aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-11-17 12:33:54 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-11-17 12:33:54 +0000
commit763dc12ae16b75aed6a97b16514f6583feef6663 (patch)
treeffebfd6e8acf7c8ebaa280dde1ca1ebdde6a7141 /src
parent34fe5458d12f8c1d7893a89e59a4d2e5f8095980 (diff)
downloadpaludis-763dc12ae16b75aed6a97b16514f6583feef6663.tar.gz
paludis-763dc12ae16b75aed6a97b16514f6583feef6663.tar.xz
Be kinder to stupid compilers: don't rely upon tr1::shared_ptr<> being callable. Don't explicitly instantiate fully specialised templates if the compielr doesn't allow it. Include -impl headers in more places to work around compilers thinking they can ignore explicit instantiations.
Diffstat (limited to 'src')
-rw-r--r--src/clients/adjutrix/command_line.cc1
-rw-r--r--src/clients/adjutrix/keywords_graph.cc2
-rw-r--r--src/clients/reconcilio/broken_linkage_finder/broken_linkage_finder.cc19
3 files changed, 12 insertions, 10 deletions
diff --git a/src/clients/adjutrix/command_line.cc b/src/clients/adjutrix/command_line.cc
index faf9a6870..503f4b998 100644
--- a/src/clients/adjutrix/command_line.cc
+++ b/src/clients/adjutrix/command_line.cc
@@ -20,6 +20,7 @@
#include "command_line.hh"
#include <paludis/name.hh>
#include <paludis/util/instantiation_policy-impl.hh>
+#include <paludis/util/visitor-impl.hh>
template class paludis::InstantiationPolicy<CommandLine, paludis::instantiation_method::SingletonTag>;
diff --git a/src/clients/adjutrix/keywords_graph.cc b/src/clients/adjutrix/keywords_graph.cc
index 4407261bf..ac4cdc4e0 100644
--- a/src/clients/adjutrix/keywords_graph.cc
+++ b/src/clients/adjutrix/keywords_graph.cc
@@ -93,7 +93,7 @@ namespace
return;
std::set<SlotName> slots;
- std::transform(packages->begin(), packages->end(),
+ std::transform(indirect_iterator(packages->begin()), indirect_iterator(packages->end()),
std::inserter(slots, slots.begin()),
tr1::mem_fn(&PackageID::slot));
diff --git a/src/clients/reconcilio/broken_linkage_finder/broken_linkage_finder.cc b/src/clients/reconcilio/broken_linkage_finder/broken_linkage_finder.cc
index 3fad1173c..95c0b3754 100644
--- a/src/clients/reconcilio/broken_linkage_finder/broken_linkage_finder.cc
+++ b/src/clients/reconcilio/broken_linkage_finder/broken_linkage_finder.cc
@@ -36,6 +36,7 @@
#include <paludis/util/visitor-impl.hh>
#include <paludis/util/wrapped_forward_iterator-impl.hh>
#include <paludis/util/member_iterator-impl.hh>
+#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/contents.hh>
#include <paludis/environment.hh>
@@ -162,14 +163,14 @@ BrokenLinkageFinder::BrokenLinkageFinder(const Environment * env, const std::str
it_end(_imp->extra_lib_dirs.end()); it_end != it; ++it)
{
Log::get_instance()->message(ll_debug, lc_context, "Need to check for extra libraries in '" + stringify(env->root() / *it) + "'");
- std::for_each(_imp->checkers.begin(), _imp->checkers.end(),
- tr1::bind(&LinkageChecker::add_extra_lib_dir, _1, env->root() / *it));
+ std::for_each(indirect_iterator(_imp->checkers.begin()), indirect_iterator(_imp->checkers.end()),
+ tr1::bind(&LinkageChecker::add_extra_lib_dir, _1, env->root() / *it));
}
tr1::function<void (const FSEntry &, const std::string &)> callback(
tr1::bind(&Implementation<BrokenLinkageFinder>::add_breakage, _imp.get(), _1, _2));
- std::for_each(_imp->checkers.begin(), _imp->checkers.end(),
- tr1::bind(&LinkageChecker::need_breakage_added, _1, callback));
+ std::for_each(indirect_iterator(_imp->checkers.begin()), indirect_iterator(_imp->checkers.end()),
+ tr1::bind(&LinkageChecker::need_breakage_added, _1, callback));
_imp->checkers.clear();
}
@@ -240,17 +241,17 @@ Implementation<BrokenLinkageFinder>::check_file(const FSEntry & file)
{
FSEntry target(dereference_with_root(file, env->root()));
if (target.is_regular_file())
- std::for_each(checkers.begin(), checkers.end(),
- tr1::bind(&LinkageChecker::note_symlink, _1, file, target));
+ std::for_each(indirect_iterator(checkers.begin()), indirect_iterator(checkers.end()),
+ tr1::bind(&LinkageChecker::note_symlink, _1, file, target));
}
else if (file.is_directory())
walk_directory(file);
else if (file.is_regular_file())
- if (checkers.end() ==
- std::find_if(checkers.begin(), checkers.end(),
- tr1::bind(&LinkageChecker::check_file, _1, file)))
+ if (indirect_iterator(checkers.end()) ==
+ std::find_if(indirect_iterator(checkers.begin()), indirect_iterator(checkers.end()),
+ tr1::bind(&LinkageChecker::check_file, _1, file)))
Log::get_instance()->message(ll_debug, lc_context, "'" + stringify(file) + "' is not a recognised file type");
}
catch (const FSError & ex)