Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
RationalNumberAdapter.h
Go to the documentation of this file.
1#pragma once
2
4
5#if defined(STORM_HAVE_CLN)
6#include <cln/cln.h>
7#endif
8
9#if defined(STORM_HAVE_GMP)
10// Disable potential warning on newer AppleClang versions
11#if __GNUC__ && defined(__has_warning)
12#if __has_warning("-Wdeprecated-literal-operator")
13#define SUPPRESSING
14#pragma GCC diagnostic push
15#pragma GCC diagnostic ignored "-Wdeprecated-literal-operator"
16#endif
17#endif
18
19#include <gmpxx.h>
20
21#ifdef SUPPRESSING
22#undef SUPPRESSING
23#pragma GCC diagnostic pop
24#endif
25
26#endif
27
28#pragma clang diagnostic push
29#pragma clang diagnostic ignored "-Wundefined-reinterpret-cast"
30#pragma clang diagnostic ignored "-Wunused-template"
31#include <carl/numbers/numbers.h>
32#pragma clang diagnostic pop
33
34#if defined(STORM_HAVE_CLN)
35namespace cln {
36inline size_t hash_value(cl_RA const& n) {
37 std::hash<cln::cl_RA> h;
38 return h(n);
39}
40} // namespace cln
41#endif
42
43#if defined(STORM_HAVE_GMP)
44inline size_t hash_value(mpq_class const& q) {
45 std::hash<mpq_class> h;
46 return h(q);
47}
48#endif
size_t hash_value(carl::Interval< Number > const &i)