aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-05-19 13:01:28 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-05-19 13:01:28 +0000
commitc2a3f405f8ce31b9fca29a4eb0021e8e46d22fa9 (patch)
treeca0d5f55f63d50c1f1b21999763b58531cc07388
parent8b4c0108793e0b8f8b447c9cbe9132705b9a29e0 (diff)
downloadpaludis-c2a3f405f8ce31b9fca29a4eb0021e8e46d22fa9.tar.gz
paludis-c2a3f405f8ce31b9fca29a4eb0021e8e46d22fa9.tar.xz
Fix g++-4.3 compile
-rw-r--r--paludis/dep_list/uninstall_list.cc1
-rw-r--r--paludis/dep_spec_flattener.cc1
-rw-r--r--paludis/environment_implementation.cc2
-rw-r--r--paludis/hashed_containers_TEST.cc2
-rw-r--r--paludis/match_package.cc1
-rw-r--r--paludis/qa/dep_any_check.cc1
-rw-r--r--paludis/qa/dep_flags_check.cc1
-rw-r--r--paludis/qa/dep_packages_check.cc1
-rw-r--r--paludis/qa/deps_exist_check.cc2
-rw-r--r--paludis/qa/deps_visible_check.cc2
-rw-r--r--paludis/qa/extract_check.cc1
-rw-r--r--paludis/qa/homepage_check.cc2
-rw-r--r--paludis/qa/license_check.cc1
-rw-r--r--paludis/qa/pdepend_overlap_check.cc2
-rw-r--r--paludis/qa/restrict_check.cc1
-rw-r--r--paludis/qa/src_uri_check.cc2
-rw-r--r--paludis/util/files.m42
-rw-r--r--paludis/util/visitor-impl.hh44
-rw-r--r--paludis/util/visitor.hh13
-rw-r--r--paludis/util/visitor_TEST.cc3
20 files changed, 70 insertions, 15 deletions
diff --git a/paludis/dep_list/uninstall_list.cc b/paludis/dep_list/uninstall_list.cc
index 040352d..49aa38e 100644
--- a/paludis/dep_list/uninstall_list.cc
+++ b/paludis/dep_list/uninstall_list.cc
@@ -26,6 +26,7 @@ using namespace paludis;
#include <paludis/util/collection_concrete.hh>
#include <paludis/util/join.hh>
#include <paludis/util/log.hh>
+#include <paludis/util/visitor-impl.hh>
#include <paludis/hashed_containers.hh>
#include <paludis/match_package.hh>
#include <paludis/version_metadata.hh>
diff --git a/paludis/dep_spec_flattener.cc b/paludis/dep_spec_flattener.cc
index 39d4020..43a1e5c 100644
--- a/paludis/dep_spec_flattener.cc
+++ b/paludis/dep_spec_flattener.cc
@@ -20,6 +20,7 @@
#include <paludis/dep_spec.hh>
#include <paludis/dep_spec_flattener.hh>
#include <list>
+#include <algorithm>
/** \file
* Implementation of dep_spec_flattener.hh.
diff --git a/paludis/environment_implementation.cc b/paludis/environment_implementation.cc
index 8bbe7e8..c90dfaa 100644
--- a/paludis/environment_implementation.cc
+++ b/paludis/environment_implementation.cc
@@ -22,7 +22,9 @@
#include <paludis/version_metadata.hh>
#include <paludis/package_database.hh>
#include <paludis/util/collection_concrete.hh>
+#include <paludis/util/visitor-impl.hh>
#include <paludis/eapi.hh>
+#include <algorithm>
using namespace paludis;
diff --git a/paludis/hashed_containers_TEST.cc b/paludis/hashed_containers_TEST.cc
index 4451ea8..8144b05 100644
--- a/paludis/hashed_containers_TEST.cc
+++ b/paludis/hashed_containers_TEST.cc
@@ -31,7 +31,7 @@ namespace test_cases
*/
struct CRCHashTest : TestCase
{
- CRCHashTest() : TestCase("crc hash") { };
+ CRCHashTest() : TestCase("crc hash") { }
void run()
{
diff --git a/paludis/match_package.cc b/paludis/match_package.cc
index 828cd1a..cd7b57f 100644
--- a/paludis/match_package.cc
+++ b/paludis/match_package.cc
@@ -22,6 +22,7 @@
#include <paludis/environment.hh>
#include <paludis/version_metadata.hh>
#include <paludis/package_database.hh>
+#include <algorithm>
using namespace paludis;
diff --git a/paludis/qa/dep_any_check.cc b/paludis/qa/dep_any_check.cc
index d8ff475..dba8cbf 100644
--- a/paludis/qa/dep_any_check.cc
+++ b/paludis/qa/dep_any_check.cc
@@ -26,6 +26,7 @@
#include <paludis/util/iterator.hh>
#include <paludis/util/save.hh>
#include <paludis/qa/qa_environment.hh>
+#include <algorithm>
using namespace paludis;
using namespace paludis::qa;
diff --git a/paludis/qa/dep_flags_check.cc b/paludis/qa/dep_flags_check.cc
index 4d05328..7d1c819 100644
--- a/paludis/qa/dep_flags_check.cc
+++ b/paludis/qa/dep_flags_check.cc
@@ -23,6 +23,7 @@
#include <paludis/portage_dep_parser.hh>
#include <paludis/qa/dep_flags_check.hh>
#include <paludis/util/iterator.hh>
+#include <paludis/util/visitor-impl.hh>
#include <paludis/qa/qa_environment.hh>
#include <set>
#include <algorithm>
diff --git a/paludis/qa/dep_packages_check.cc b/paludis/qa/dep_packages_check.cc
index aea058b..a4dab6c 100644
--- a/paludis/qa/dep_packages_check.cc
+++ b/paludis/qa/dep_packages_check.cc
@@ -24,6 +24,7 @@
#include <paludis/qa/dep_packages_check.hh>
#include <paludis/config_file.hh>
#include <paludis/util/log.hh>
+#include <paludis/util/visitor-impl.hh>
#include <paludis/util/system.hh>
#include <paludis/qa/qa_environment.hh>
#include <set>
diff --git a/paludis/qa/deps_exist_check.cc b/paludis/qa/deps_exist_check.cc
index 581bff6..b08e776 100644
--- a/paludis/qa/deps_exist_check.cc
+++ b/paludis/qa/deps_exist_check.cc
@@ -24,7 +24,9 @@
#include <paludis/qa/deps_exist_check.hh>
#include <paludis/util/save.hh>
#include <paludis/query.hh>
+#include <paludis/util/visitor-impl.hh>
#include <paludis/qa/qa_environment.hh>
+#include <algorithm>
using namespace paludis;
using namespace paludis::qa;
diff --git a/paludis/qa/deps_visible_check.cc b/paludis/qa/deps_visible_check.cc
index 70320a3..d2bd552 100644
--- a/paludis/qa/deps_visible_check.cc
+++ b/paludis/qa/deps_visible_check.cc
@@ -24,10 +24,12 @@
#include <paludis/portage_dep_parser.hh>
#include <paludis/dep_spec.hh>
#include <paludis/dep_spec_pretty_printer.hh>
+#include <paludis/util/visitor-impl.hh>
#include <paludis/util/save.hh>
#include <paludis/query.hh>
#include <list>
+#include <algorithm>
using namespace paludis;
using namespace paludis::qa;
diff --git a/paludis/qa/extract_check.cc b/paludis/qa/extract_check.cc
index dc33446..36d773f 100644
--- a/paludis/qa/extract_check.cc
+++ b/paludis/qa/extract_check.cc
@@ -23,6 +23,7 @@
#include <paludis/portage_dep_parser.hh>
#include <paludis/qa/extract_check.hh>
#include <paludis/util/tokeniser.hh>
+#include <paludis/util/visitor-impl.hh>
#include <paludis/qa/qa_environment.hh>
using namespace paludis;
diff --git a/paludis/qa/homepage_check.cc b/paludis/qa/homepage_check.cc
index 99bb51f..c865fd0 100644
--- a/paludis/qa/homepage_check.cc
+++ b/paludis/qa/homepage_check.cc
@@ -21,6 +21,8 @@
#include <paludis/package_database_entry.hh>
#include <paludis/environment.hh>
#include <paludis/qa/qa_environment.hh>
+#include <paludis/util/visitor-impl.hh>
+#include <algorithm>
using namespace paludis;
using namespace paludis::qa;
diff --git a/paludis/qa/license_check.cc b/paludis/qa/license_check.cc
index 0f20e6d..c32b374 100644
--- a/paludis/qa/license_check.cc
+++ b/paludis/qa/license_check.cc
@@ -24,6 +24,7 @@
#include <paludis/qa/license_check.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/qa/qa_environment.hh>
+#include <paludis/util/visitor-impl.hh>
using namespace paludis;
using namespace paludis::qa;
diff --git a/paludis/qa/pdepend_overlap_check.cc b/paludis/qa/pdepend_overlap_check.cc
index 72461cc..b7caade 100644
--- a/paludis/qa/pdepend_overlap_check.cc
+++ b/paludis/qa/pdepend_overlap_check.cc
@@ -24,7 +24,9 @@
#include <paludis/qa/pdepend_overlap_check.hh>
#include <paludis/util/join.hh>
#include <paludis/qa/qa_environment.hh>
+#include <paludis/util/visitor-impl.hh>
#include <set>
+#include <algorithm>
using namespace paludis;
using namespace paludis::qa;
diff --git a/paludis/qa/restrict_check.cc b/paludis/qa/restrict_check.cc
index f950537..9ce083e 100644
--- a/paludis/qa/restrict_check.cc
+++ b/paludis/qa/restrict_check.cc
@@ -23,6 +23,7 @@
#include <paludis/util/tokeniser.hh>
#include <paludis/package_database_entry.hh>
#include <paludis/environment.hh>
+#include <paludis/util/visitor-impl.hh>
#include <paludis/qa/qa_environment.hh>
#include <set>
diff --git a/paludis/qa/src_uri_check.cc b/paludis/qa/src_uri_check.cc
index 7854340..633038c 100644
--- a/paludis/qa/src_uri_check.cc
+++ b/paludis/qa/src_uri_check.cc
@@ -23,8 +23,10 @@
#include <paludis/environment.hh>
#include <paludis/qa/src_uri_check.hh>
#include <paludis/util/tokeniser.hh>
+#include <paludis/util/visitor-impl.hh>
#include <paludis/qa/qa_environment.hh>
#include <set>
+#include <algorithm>
using namespace paludis;
using namespace paludis::qa;
diff --git a/paludis/util/files.m4 b/paludis/util/files.m4
index 55bcac6..4c992de 100644
--- a/paludis/util/files.m4
+++ b/paludis/util/files.m4
@@ -40,5 +40,5 @@ add(`tokeniser', `hh', `cc', `test')
add(`util', `hh')
add(`validated', `hh', `fwd', `test')
add(`virtual_constructor', `hh', `impl', `test')
-add(`visitor', `hh', `fwd', `test')
+add(`visitor', `hh', `impl', `fwd', `test')
diff --git a/paludis/util/visitor-impl.hh b/paludis/util/visitor-impl.hh
new file mode 100644
index 0000000..e050fdc
--- /dev/null
+++ b/paludis/util/visitor-impl.hh
@@ -0,0 +1,44 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
+ *
+ * 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
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef PALUDIS_GUARD_PALUDIS_UTIL_VISITOR_IMPL_HH
+#define PALUDIS_GUARD_PALUDIS_UTIL_VISITOR_IMPL_HH 1
+
+#include <algorithm>
+#include <paludis/util/visitor.hh>
+
+template <
+ typename N1_,
+ typename N2_,
+ typename N3_,
+ typename N4_,
+ typename N5_,
+ typename N6_,
+ typename N7_,
+ typename N8_,
+ typename N9_>
+template <typename OurType_, typename C1_>
+void
+paludis::VisitorTypes<N1_, N2_, N3_, N4_, N5_, N6_, N7_, N8_, N9_>::ConstVisitor::VisitChildren<OurType_, C1_>::visit(
+ typename paludis::visitor_internals::MakePointerToConst<C1_ *>::Type const c)
+{
+ std::for_each(c->begin(), c->end(), paludis::accept_visitor(static_cast<OurType_ *>(this)));
+}
+
+#endif
diff --git a/paludis/util/visitor.hh b/paludis/util/visitor.hh
index 3e14879..fde55e0 100644
--- a/paludis/util/visitor.hh
+++ b/paludis/util/visitor.hh
@@ -28,14 +28,6 @@
#include <paludis/util/visitor-fwd.hh>
-namespace std
-{
-#ifndef DOXYGEN
- template <typename A_, typename B_>
- B_ for_each(A_, A_, B_);
-#endif
-}
-
namespace paludis
{
template <typename NodePtrType_>
@@ -396,10 +388,7 @@ namespace paludis
struct VisitorTypes<N1_, N2_, N3_, N4_, N5_, N6_, N7_, N8_, N9_>::ConstVisitor::VisitChildren :
virtual visitor_internals::Visits<typename visitor_internals::MakePointerToConst<C1_ *>::Type>
{
- virtual void visit(typename visitor_internals::MakePointerToConst<C1_ *>::Type const c)
- {
- std::for_each(c->begin(), c->end(), accept_visitor(static_cast<OurType_ *>(this)));
- }
+ virtual void visit(typename visitor_internals::MakePointerToConst<C1_ *>::Type const c);
};
}
diff --git a/paludis/util/visitor_TEST.cc b/paludis/util/visitor_TEST.cc
index 253d7f7..a4990e0 100644
--- a/paludis/util/visitor_TEST.cc
+++ b/paludis/util/visitor_TEST.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ * Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
*
* 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
@@ -20,6 +20,7 @@
#include <algorithm>
#include <paludis/util/iterator.hh>
#include <paludis/util/visitor.hh>
+#include <paludis/util/visitor-impl.hh>
#include <test/test_framework.hh>
#include <test/test_runner.hh>
#include <vector>