diff options
author | Tim King <taking@cs.nyu.edu> | 2017-07-16 22:13:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-16 22:13:10 -0700 |
commit | 949e19cbc2881996e5c5eed613f4506264482039 (patch) | |
tree | b96131f9df0699fcd86826a1b970a101af550f37 /src/context | |
parent | 28693db66c42bf48b9d748aba869d4fe149b6b44 (diff) |
Moving to static_assert now that c++11 is available.
Diffstat (limited to 'src/context')
-rw-r--r-- | src/context/cdinsert_hashmap.h | 7 | ||||
-rw-r--r-- | src/context/cdlist.h | 17 | ||||
-rw-r--r-- | src/context/cdtrail_hashmap.h | 6 |
3 files changed, 14 insertions, 16 deletions
diff --git a/src/context/cdinsert_hashmap.h b/src/context/cdinsert_hashmap.h index f53d60cf9..ef8f661fa 100644 --- a/src/context/cdinsert_hashmap.h +++ b/src/context/cdinsert_hashmap.h @@ -33,7 +33,6 @@ #include "cvc4_private.h" -#include <boost/static_assert.hpp> #include <deque> #include <ext/hash_map> #include <utility> @@ -383,9 +382,8 @@ public: } };/* class CDInsertHashMap<> */ - template <class Data, class HashFcn> -class CDInsertHashMap <TNode, Data, HashFcn > : public ContextObj { +class CDInsertHashMap<TNode, Data, HashFcn> : public ContextObj { /* CDInsertHashMap is challenging to get working with TNode. * Consider using CDHashMap<TNode,...> instead. * @@ -397,7 +395,8 @@ class CDInsertHashMap <TNode, Data, HashFcn > : public ContextObj { * hashed. Getting the order right with a guarantee is too hard. */ - BOOST_STATIC_ASSERT(sizeof(Data) == 0); + static_assert(sizeof(Data) == 0, + "Cannot create a CDInsertHashMap with TNode keys"); }; }/* CVC4::context namespace */ diff --git a/src/context/cdlist.h b/src/context/cdlist.h index 7cee41b91..3dab675c3 100644 --- a/src/context/cdlist.h +++ b/src/context/cdlist.h @@ -20,7 +20,6 @@ #ifndef __CVC4__CONTEXT__CDLIST_H #define __CVC4__CONTEXT__CDLIST_H -#include <boost/static_assert.hpp> #include <iterator> #include <memory> #include <string> @@ -417,21 +416,21 @@ public: } };/* class CDList<> */ - template <class T, class CleanUp> -class CDList <T, CleanUp, ContextMemoryAllocator<T> > : public ContextObj { +class CDList<T, CleanUp, ContextMemoryAllocator<T> > : public ContextObj { /* CDList is incompatible for use with a ContextMemoryAllocator. * Consider using CDChunkList<T> instead. * * Explanation: - * If ContextMemoryAllocator is used and d_list grows at a deeper context level - * the reallocated will be reallocated in a context memory region that can be - * destroyed on pop. To support this, a full copy of d_list would have to be made. - * As this is unacceptable for performance in other situations, we do not do - * this. + * If ContextMemoryAllocator is used and d_list grows at a deeper context + * level the reallocated will be reallocated in a context memory region that + * can be destroyed on pop. To support this, a full copy of d_list would have + * to be made. As this is unacceptable for performance in other situations, we + * do not do this. */ - BOOST_STATIC_ASSERT(sizeof(T) == 0); + static_assert(sizeof(T) == 0, + "Cannot create a CDList with a ContextMemoryAllocator."); }; }/* CVC4::context namespace */ diff --git a/src/context/cdtrail_hashmap.h b/src/context/cdtrail_hashmap.h index 9f364eac5..0d265271d 100644 --- a/src/context/cdtrail_hashmap.h +++ b/src/context/cdtrail_hashmap.h @@ -44,7 +44,6 @@ #pragma once -#include <boost/static_assert.hpp> #include <ext/hash_map> #include <deque> #include <utility> @@ -551,7 +550,7 @@ public: };/* class CDTrailHashMap<> */ template <class Data, class HashFcn> -class CDTrailHashMap <TNode, Data, HashFcn > : public ContextObj { +class CDTrailHashMap<TNode, Data, HashFcn> : public ContextObj { /* CDTrailHashMap is challenging to get working with TNode. * Consider using CDHashMap<TNode,...> instead. * @@ -563,7 +562,8 @@ class CDTrailHashMap <TNode, Data, HashFcn > : public ContextObj { * hashed. Getting the order right with a guarantee is too hard. */ - BOOST_STATIC_ASSERT(sizeof(Data) == 0); + static_assert(sizeof(Data) == 0, + "Cannot create a CDTrailHashMap with TNode keys"); }; }/* CVC4::context namespace */ |