11 #include <boost/functional/hash.hpp>
24 template <region_compatible R>
region_view(
const R& a) : region_(std::addressof(a)) {}
38 template <region_compatible R> auto
downcast() const -> const R& {
return *
reinterpret_cast<const R*
>(region_); }
49 template <region_compatible Region>
struct permit
51 permit() noexcept =
delete;
62 template <std::
size_t I,
typename R> decltype(
auto) get(
permit<R>& ts)
71 template <std::
size_t I,
typename R> decltype(
auto) get(const permit<R>& ts)
85 template <
typename Region>
struct hash<uat::permit<Region>>
91 boost::hash_combine(seed, std::hash<Region>{}(p.location));
92 boost::hash_combine(seed, std::hash<std::size_t>{}(p.time));
98 template <
typename R>
struct tuple_size<uat::permit<R>> :
public integral_constant<size_t, 2>
102 template <
typename R>
struct tuple_element<0, uat::permit<R>>
108 template <
typename R>
struct tuple_element<0, const uat::permit<R>>
110 using type =
const R&;
114 template <
typename R>
struct tuple_element<1, uat::permit<R>>
120 template <
typename R>
struct tuple_element<1, const uat::permit<R>>
A non-owning wrapper to an atomic region in the airspace.
Definition: permit.hpp:21
region_view(const R &a)
Constructs a non-owning wrapper to a region that satisfies the region_compatible concept.
Definition: permit.hpp:24
auto downcast() const -> const R &
Definition: permit.hpp:38
A tuple containing a region and a time step.
Definition: permit.hpp:50
Region location
The region.
Definition: permit.hpp:57
uint_t time
The time step.
Definition: permit.hpp:58
Basic types and utilities.
std::size_t uint_t
Default unsigned integer type.
Definition: type.hpp:29