Skip to content

Commit

Permalink
Remove extraneous layout policy
Browse files Browse the repository at this point in the history
  • Loading branch information
griswaldbrooks committed Sep 8, 2024
1 parent 3f5e5f2 commit 937cf21
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,23 +210,6 @@ double degrees_to_radians(double degrees) { return degrees * std::numbers::pi /

} // namespace geometry

struct bounds_checked_layout_policy {
template <typename Extents>
struct mapping : std::layout_right::mapping<Extents> {
using base_t = std::layout_right::mapping<Extents>;
using base_t::base_t;
std::ptrdiff_t operator()(auto... idxs) const {
[&]<size_t... Is>(std::index_sequence<Is...>) {
if (((idxs < 0 || idxs > this->extents().extent(Is)) || ...)) {
throw std::out_of_range("Invalid bin index");
}
}
(std::make_index_sequence<sizeof...(idxs)>{});
return this->base_t::operator()(idxs...);
}
};
};

struct layout_rotatable {
template <typename Extents>
requires(Extents::rank() == 2) struct mapping {
Expand Down

0 comments on commit 937cf21

Please sign in to comment.