aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-11-09 11:59:52 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-11-09 11:59:52 +0000
commitafefdaff0555a68488bb11d4e4c7f5e790f25917 (patch)
treeafab105b0b03d95adaa12d95187e757d8cec6872
parent7e95436491e6b6b496dfc9b197087cc417239c6e (diff)
downloadpaludis-afefdaff0555a68488bb11d4e4c7f5e790f25917.tar.gz
paludis-afefdaff0555a68488bb11d4e4c7f5e790f25917.tar.xz
Support compilers that think that there shouldn't be a template<> before template specialisations of templates
-rw-r--r--configure.ac15
-rw-r--r--paludis/dep_label.cc4
-rw-r--r--paludis/dep_spec.cc2
-rw-r--r--paludis/dep_spec_flattener.cc4
-rw-r--r--paludis/util/graph-impl.hh2
-rw-r--r--paludis/util/map-impl.hh2
-rw-r--r--paludis/util/sequence-impl.hh2
-rw-r--r--paludis/util/set-impl.hh2
8 files changed, 33 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index c1a702e..90be6cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -171,6 +171,20 @@ using n::r_x;
AC_MSG_ERROR([Your compiler is b0rked (GCC bug 31899?)])])
dnl }}}
+dnl {{{ check for whether we want an extra template<> for Implementation
+AC_MSG_CHECKING([whether your compiler wants template<> for template specialisations of template classes])
+AC_COMPILE_IFELSE([
+template <typename T_> struct S;
+template <typename T_> struct T;
+template <> template <typename T_> struct S<T<T_> > { };
+],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ PALUDIS_CXXFLAGS="${PALUDIS_CXXFLAGS} -DPALUDIS_NO_DOUBLE_TEMPLATE=1"
+ PALUDIS_PC_CFLAGS="${PALUDIS_PC_CFLAGS} -DPALUDIS_NO_DOUBLE_TEMPLATE=1"
+ ])
+dnl }}}
+
dnl {{{ check for static_assert
AC_MSG_CHECKING([for compiler support for static_assert])
AC_COMPILE_IFELSE([
@@ -566,6 +580,7 @@ if test "x${cxx_compiler_icc}" = "xyes" ; then
CHECK_CXXFLAG([-wd383])
CHECK_CXXFLAG([-wd444])
CHECK_CXXFLAG([-wd488])
+ CHECK_CXXFLAG([-wd810])
CHECK_CXXFLAG([-wd981])
CHECK_CXXFLAG([-wd1125])
CHECK_CXXFLAG([-wd1418])
diff --git a/paludis/dep_label.cc b/paludis/dep_label.cc
index 8d1ce63..072cabb 100644
--- a/paludis/dep_label.cc
+++ b/paludis/dep_label.cc
@@ -43,7 +43,9 @@ URILabel::~URILabel()
namespace paludis
{
+#ifndef PALUDIS_NO_DOUBLE_TEMPLATE
template <>
+#endif
template <typename T_>
struct Implementation<ConcreteURILabel<T_> >
{
@@ -93,7 +95,9 @@ DependencyLabel::~DependencyLabel()
namespace paludis
{
+#ifndef PALUDIS_NO_DOUBLE_TEMPLATE
template <>
+#endif
template <typename T_, typename C_>
struct Implementation<ConcreteDependencyLabel<T_, C_> >
{
diff --git a/paludis/dep_spec.cc b/paludis/dep_spec.cc
index 552caed..f023234 100644
--- a/paludis/dep_spec.cc
+++ b/paludis/dep_spec.cc
@@ -1088,7 +1088,9 @@ FetchableURIDepSpec::clone() const
namespace paludis
{
+#ifndef PALUDIS_NO_DOUBLE_TEMPLATE
template <>
+#endif
template <typename T_>
struct Implementation<LabelsDepSpec<T_ > >
{
diff --git a/paludis/dep_spec_flattener.cc b/paludis/dep_spec_flattener.cc
index 1031c1e..bc07e81 100644
--- a/paludis/dep_spec_flattener.cc
+++ b/paludis/dep_spec_flattener.cc
@@ -33,7 +33,9 @@ using namespace paludis;
namespace paludis
{
+#ifndef PALUDIS_NO_DOUBLE_TEMPLATE
template <>
+#endif
template <typename Heirarchy_, typename Item_>
struct Implementation<DepSpecFlattener<Heirarchy_, Item_> >
{
@@ -105,7 +107,9 @@ dep_spec_flattener_internals::VisitUseDepSpec<Heirarchy_, Item_, true>::visit_se
namespace paludis
{
+#ifndef PALUDIS_NO_DOUBLE_TEMPLATE
template <>
+#endif
template <typename Heirarchy_, typename Item_>
struct Implementation<dep_spec_flattener_internals::VisitNamedSetDepSpec<Heirarchy_, Item_, true> >
{
diff --git a/paludis/util/graph-impl.hh b/paludis/util/graph-impl.hh
index a424540..08e3b73 100644
--- a/paludis/util/graph-impl.hh
+++ b/paludis/util/graph-impl.hh
@@ -83,7 +83,9 @@ namespace paludis
* \ingroup g_data_structures
* \nosubgrouping
*/
+#ifndef PALUDIS_NO_DOUBLE_TEMPLATE
template<>
+#endif
template <typename Node_, typename Edge_>
struct Implementation<DirectedGraph<Node_, Edge_> >
{
diff --git a/paludis/util/map-impl.hh b/paludis/util/map-impl.hh
index dec99f4..1f34120 100644
--- a/paludis/util/map-impl.hh
+++ b/paludis/util/map-impl.hh
@@ -53,7 +53,9 @@ namespace paludis
* \ingroup g_data_structures
* \nosubgrouping
*/
+#ifndef PALUDIS_NO_DOUBLE_TEMPLATE
template <>
+#endif
template <typename K_, typename V_, typename C_>
struct Implementation<Map<K_, V_, C_> >
{
diff --git a/paludis/util/sequence-impl.hh b/paludis/util/sequence-impl.hh
index c364c18..9cf05d9 100644
--- a/paludis/util/sequence-impl.hh
+++ b/paludis/util/sequence-impl.hh
@@ -41,7 +41,9 @@ namespace paludis
* \ingroup g_data_structures
* \nosubgrouping
*/
+#ifndef PALUDIS_NO_DOUBLE_TEMPLATE
template <>
+#endif
template <typename T_>
struct Implementation<Sequence<T_> >
{
diff --git a/paludis/util/set-impl.hh b/paludis/util/set-impl.hh
index b3e1521..6a68e06 100644
--- a/paludis/util/set-impl.hh
+++ b/paludis/util/set-impl.hh
@@ -55,7 +55,9 @@ namespace paludis
* \ingroup g_data_structures
* \nosubgrouping
*/
+#ifndef PALUDIS_NO_DOUBLE_TEMPLATE
template <>
+#endif
template <typename T_, typename C_>
struct Implementation<Set<T_, C_> >
{