1 /********************* */
4 ** Top contributors (to current version):
5 ** Morgan Deters, Christopher L. Conway, Paul Meng
6 ** This file is part of the CVC4 project.
7 ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS
8 ** in the top-level source directory) and their institutional affiliations.
9 ** All rights reserved. See the file COPYING in the top-level source
10 ** directory for licensing information.\endverbatim
12 ** \brief [[ Add one-line brief description here ]]
14 ** [[ Add lengthier description here ]]
15 ** \todo document this file
18 #include "cvc4_public.h"
20 #ifndef __CVC4__HASH_H
21 #define __CVC4__HASH_H
28 #ifdef CVC4_NEED_HASH_UINT64_T
29 // on some versions and architectures of GNU C++, we need a
30 // specialization of hash for 64-bit values
32 struct hash
<uint64_t> {
33 size_t operator()(uint64_t v
) const {
36 };/* struct hash<uint64_t> */
37 #endif /* CVC4_NEED_HASH_UINT64_T */
44 template <class T
, class U
, class HashT
= std::hash
<T
>, class HashU
= std::hash
<U
> >
45 struct PairHashFunction
{
46 size_t operator()(const std::pair
<T
, U
>& pr
) const {
47 return HashT()(pr
.first
) ^ HashU()(pr
.second
);
49 };/* struct PairHashFunction */
53 #endif /* __CVC4__HASH_H */