summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2018-08-07 17:26:58 -0700
committerGitHub <noreply@github.com>2018-08-07 17:26:58 -0700
commitc831d34205a473cbace8a546704a992ba8220dd6 (patch)
tree0dae0fabc4b96b2a53665bd0c6c965361538517d /src/util
parent82515cbaef14918c7ce825e29a30de01c13d90ac (diff)
Delete functions instead of using CVC4_UNDEFINED (#1794)
C++11 supports explicitly deleting functions that should not be used (explictly or implictly), e.g. copy or assignment constructors. We were previously using the CVC4_UNDEFINED macro that used a compiler-specific attribute. The C++11 feature should be more portable.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/bin_heap.h4
-rw-r--r--src/util/resource_manager.h4
-rw-r--r--src/util/statistics_registry.h10
3 files changed, 9 insertions, 9 deletions
diff --git a/src/util/bin_heap.h b/src/util/bin_heap.h
index 7d733829b..d547530b1 100644
--- a/src/util/bin_heap.h
+++ b/src/util/bin_heap.h
@@ -60,8 +60,8 @@ private:
CmpFcn d_cmp;
// disallow copy and assignment
- BinaryHeap(const BinaryHeap&) CVC4_UNDEFINED;
- BinaryHeap& operator=(const BinaryHeap&) CVC4_UNDEFINED;
+ BinaryHeap(const BinaryHeap&) = delete;
+ BinaryHeap& operator=(const BinaryHeap&) = delete;
public:
BinaryHeap(const CmpFcn& c = CmpFcn())
diff --git a/src/util/resource_manager.h b/src/util/resource_manager.h
index 2fa7a6bb4..3ca2babcf 100644
--- a/src/util/resource_manager.h
+++ b/src/util/resource_manager.h
@@ -120,13 +120,13 @@ class CVC4_PUBLIC ResourceManager {
* ResourceManagers cannot be copied as they are given an explicit
* list of Listeners to respond to.
*/
- ResourceManager(const ResourceManager&) CVC4_UNDEFINED;
+ ResourceManager(const ResourceManager&) = delete;
/**
* ResourceManagers cannot be assigned as they are given an explicit
* list of Listeners to respond to.
*/
- ResourceManager& operator=(const ResourceManager&) CVC4_UNDEFINED;
+ ResourceManager& operator=(const ResourceManager&) = delete;
public:
diff --git a/src/util/statistics_registry.h b/src/util/statistics_registry.h
index b000e91e8..d7f105b65 100644
--- a/src/util/statistics_registry.h
+++ b/src/util/statistics_registry.h
@@ -392,9 +392,9 @@ class WrappedStat : public ReadOnlyDataStat<typename Stat::payload_t> {
const ReadOnlyDataStat<T>& d_stat;
/** Private copy constructor undefined (no copy permitted). */
- WrappedStat(const WrappedStat&) CVC4_UNDEFINED;
+ WrappedStat(const WrappedStat&) = delete;
/** Private assignment operator undefined (no copy permitted). */
- WrappedStat<T>& operator=(const WrappedStat&) CVC4_UNDEFINED;
+ WrappedStat<T>& operator=(const WrappedStat&) = delete;
public:
@@ -653,7 +653,7 @@ class CVC4_PUBLIC StatisticsRegistry : public StatisticsBase, public Stat {
private:
/** Private copy constructor undefined (no copy permitted). */
- StatisticsRegistry(const StatisticsRegistry&) CVC4_UNDEFINED;
+ StatisticsRegistry(const StatisticsRegistry&) = delete;
public:
@@ -760,9 +760,9 @@ class CodeTimer {
bool d_reentrant;
/** Private copy constructor undefined (no copy permitted). */
- CodeTimer(const CodeTimer& timer) CVC4_UNDEFINED;
+ CodeTimer(const CodeTimer& timer) = delete;
/** Private assignment operator undefined (no copy permitted). */
- CodeTimer& operator=(const CodeTimer& timer) CVC4_UNDEFINED;
+ CodeTimer& operator=(const CodeTimer& timer) = delete;
public:
CodeTimer(TimerStat& timer, bool allow_reentrant = false) : d_timer(timer), d_reentrant(false) {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback