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 /examples/hashsmt | |
parent | 28693db66c42bf48b9d748aba869d4fe149b6b44 (diff) |
Moving to static_assert now that c++11 is available.
Diffstat (limited to 'examples/hashsmt')
-rw-r--r-- | examples/hashsmt/sha1.hpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/examples/hashsmt/sha1.hpp b/examples/hashsmt/sha1.hpp index 4bfee50fc..72c560dff 100644 --- a/examples/hashsmt/sha1.hpp +++ b/examples/hashsmt/sha1.hpp @@ -30,9 +30,9 @@ // Note: this implementation does not handle message longer than // 2^32 bytes. -#pragma once +#ifndef __CVC4__EXAMPLES__HASHSMT__SHA1_H +#define __CVC4__EXAMPLES__HASHSMT__SHA1_H -#include <boost/static_assert.hpp> #include <cstddef> #include "word.h" @@ -45,8 +45,10 @@ namespace std { namespace hashsmt { -BOOST_STATIC_ASSERT(sizeof(unsigned char)*8 == 8); -BOOST_STATIC_ASSERT(sizeof(unsigned int)*8 == 32); +static_assert(sizeof(unsigned char)*8 == 8, + "Unexpected size for unsigned char"); +static_assert(sizeof(unsigned int)*8 == 32, + "Unexpected size for unsigned int"); inline cvc4_uint32 left_rotate(cvc4_uint32 x, std::size_t n) { @@ -224,3 +226,4 @@ inline void sha1::get_digest(digest_type digest) } // namespace hashsmt +#endif /* __CVC4__EXAMPLES__HASHSMT__SHA1_H */ |