uatlib
Loading...
Searching...
No Matches
type.hpp
Go to the documentation of this file.
1
3
4#ifndef UAT_TYPE_HPP
5#define UAT_TYPE_HPP
6
7#include <concepts>
8#include <cstddef>
9#include <cstdint>
10#include <functional>
11
12namespace uat
13{
14
16template <typename T>
17concept hashable = requires(T a)
18{
19 {
20 std::hash<T>{}(a)
21 } -> std::convertible_to<std::size_t>;
22};
23
25template <typename R>
26concept region_compatible = hashable<R> && std::equality_comparable<R> && std::copyable<R>;
27
29using uint_t = std::size_t;
30
32using id_t = std::size_t;
33
36
37} // namespace uat
38
39#endif // UAT_TYPE_HPP
Concept for types that are hashable.
Definition type.hpp:17
Concept for types that are compatible as regions.
Definition type.hpp:26
A tuple containing a region and a time step.
Definition permit.hpp:50
std::size_t uint_t
Default unsigned integer type.
Definition type.hpp:29
std::size_t id_t
Default type for identifier.
Definition type.hpp:32
double value_t
Default type for price.
Definition type.hpp:35