aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-21 20:25:45 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-22 18:54:44 +0100
commit55420176135d83033c6411430ac665dbe4d106cf (patch)
tree101094d88269564932be13d6dda70bd2c4c1b414
parenta47d91435f3a86262f11661f449ccd5dd40d6653 (diff)
downloadpaludis-55420176135d83033c6411430ac665dbe4d106cf.tar.gz
paludis-55420176135d83033c6411430ac665dbe4d106cf.tar.xz
Require c++0x default/deleted
-rw-r--r--configure.ac6
-rw-r--r--paludis/resolver/decision.cc42
-rw-r--r--paludis/resolver/resolvent.cc13
-rw-r--r--paludis/resolver/spec_rewriter.cc10
4 files changed, 2 insertions, 69 deletions
diff --git a/configure.ac b/configure.ac
index 7269d41..8d015ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -746,11 +746,9 @@ struct S
S & operator= (const S &) = delete;
};
],
- [AC_MSG_RESULT([yes])
- PALUDIS_CXXFLAGS="${PALUDIS_CXXFLAGS} -DPALUDIS_HAVE_DEFAULT_DELETED=1"
- PALUDIS_PC_CFLAGS="${PALUDIS_PC_CFLAGS} -DPALUDIS_HAVE_DEFAULT_DELETED=1"
- ],
+ [AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
+ AC_MSG_ERROR([your compiler does not support c++0x default and deleted functions])
])
dnl }}}
diff --git a/paludis/resolver/decision.cc b/paludis/resolver/decision.cc
index 00f4081..0d0ed67 100644
--- a/paludis/resolver/decision.cc
+++ b/paludis/resolver/decision.cc
@@ -34,13 +34,7 @@
using namespace paludis;
using namespace paludis::resolver;
-#ifdef PALUDIS_HAVE_DEFAULT_DELETED
Decision::~Decision() = default;
-#else
-Decision::~Decision()
-{
-}
-#endif
const std::tr1::shared_ptr<Decision>
Decision::deserialise(Deserialisation & d)
@@ -221,13 +215,7 @@ NothingNoChangeDecision::NothingNoChangeDecision(const Resolvent & r, const bool
{
}
-#ifdef PALUDIS_HAVE_DEFAULT_DELETED
NothingNoChangeDecision::~NothingNoChangeDecision() = default;
-#else
-NothingNoChangeDecision::~NothingNoChangeDecision()
-{
-}
-#endif
const Resolvent
NothingNoChangeDecision::resolvent() const
@@ -283,13 +271,7 @@ ExistingNoChangeDecision::ExistingNoChangeDecision(const Resolvent & l, const st
{
}
-#ifdef PALUDIS_HAVE_DEFAULT_DELETED
ExistingNoChangeDecision::~ExistingNoChangeDecision() = default;
-#else
-ExistingNoChangeDecision::~ExistingNoChangeDecision()
-{
-}
-#endif
const std::tr1::shared_ptr<const PackageID>
ExistingNoChangeDecision::existing_id() const
@@ -386,13 +368,7 @@ ChangesToMakeDecision::ChangesToMakeDecision(
f(*this);
}
-#ifdef PALUDIS_HAVE_DEFAULT_DELETED
ChangesToMakeDecision::~ChangesToMakeDecision() = default;
-#else
-ChangesToMakeDecision::~ChangesToMakeDecision()
-{
-}
-#endif
const std::tr1::shared_ptr<const Destination>
ChangesToMakeDecision::destination() const
@@ -511,13 +487,7 @@ UnableToMakeDecision::UnableToMakeDecision(
{
}
-#ifdef PALUDIS_HAVE_DEFAULT_DELETED
UnableToMakeDecision::~UnableToMakeDecision() = default;
-#else
-UnableToMakeDecision::~UnableToMakeDecision()
-{
-}
-#endif
const std::tr1::shared_ptr<const UnsuitableCandidates>
UnableToMakeDecision::unsuitable_candidates() const
@@ -571,13 +541,7 @@ RemoveDecision::RemoveDecision(const Resolvent & l, const std::tr1::shared_ptr<c
{
}
-#ifdef PALUDIS_HAVE_DEFAULT_DELETED
RemoveDecision::~RemoveDecision() = default;
-#else
-RemoveDecision::~RemoveDecision()
-{
-}
-#endif
const Resolvent
RemoveDecision::resolvent() const
@@ -649,13 +613,7 @@ BreakDecision::BreakDecision(const Resolvent & l, const std::tr1::shared_ptr<con
{
}
-#ifdef PALUDIS_HAVE_DEFAULT_DELETED
BreakDecision::~BreakDecision() = default;
-#else
-BreakDecision::~BreakDecision()
-{
-}
-#endif
const std::tr1::shared_ptr<const PackageID>
BreakDecision::existing_id() const
diff --git a/paludis/resolver/resolvent.cc b/paludis/resolver/resolvent.cc
index d28c855..1491d5f 100644
--- a/paludis/resolver/resolvent.cc
+++ b/paludis/resolver/resolvent.cc
@@ -75,21 +75,8 @@ paludis::resolver::operator== (const Resolvent & a, const Resolvent & b)
return true;
}
-#ifdef PALUDIS_HAVE_DEFAULT_DELETED
-
Resolvent::Resolvent(const Resolvent &) = default;
-#else
-
-Resolvent::Resolvent(const Resolvent & other) :
- destination_type(other.destination_type()),
- package(other.package()),
- slot(other.slot())
-{
-}
-
-#endif
-
Resolvent::Resolvent(
const PackageDepSpec & spec,
const SlotName & s,
diff --git a/paludis/resolver/spec_rewriter.cc b/paludis/resolver/spec_rewriter.cc
index e82a58f..d47bbb8 100644
--- a/paludis/resolver/spec_rewriter.cc
+++ b/paludis/resolver/spec_rewriter.cc
@@ -84,18 +84,8 @@ SpecRewriter::SpecRewriter(const Environment * const e) :
{
}
-#ifdef PALUDIS_HAVE_DEFAULT_DELETED
-
SpecRewriter::~SpecRewriter() = default;
-#else
-
-SpecRewriter::~SpecRewriter()
-{
-}
-
-#endif
-
const std::tr1::shared_ptr<const RewrittenSpec>
SpecRewriter::rewrite_if_special(const PackageOrBlockDepSpec & s, const std::tr1::shared_ptr<const Resolvent> & maybe_our_resolvent) const
{