Tatooine
creator.h
Go to the documentation of this file.
1#ifndef TATOOINE_DETAIL_RECTILINEAR_GRID_CREATOR_H
2#define TATOOINE_DETAIL_RECTILINEAR_GRID_CREATOR_H
3//==============================================================================
5//==============================================================================
6namespace tatooine {
7//==============================================================================
8template <floating_point_range... Dimensions>
9requires(sizeof...(Dimensions) > 1)
10class rectilinear_grid;
11//==============================================================================
12} // namespace tatooine
13//==============================================================================
14namespace tatooine::detail::rectilinear_grid {
15//==============================================================================
16template <dimension IndexableSpace, std::size_t N>
17struct creator {
18 private:
19 template <typename... Args, std::size_t... Seq>
20 static constexpr auto create(std::index_sequence<Seq...> /*seq*/,
21 Args&&... args) {
23 IndexableSpace{}))...>{
24 std::forward<Args>(args)...};
25 }
26 template <typename... Args>
27 static constexpr auto create(Args&&... args) {
28 return create(std::make_index_sequence<N>{}, std::forward<Args>(args)...);
29 }
30
31 public:
32 using type = decltype(create());
33};
34// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
35template <dimension IndexableSpace, std::size_t N>
36using creator_t =
38//==============================================================================
39} // namespace tatooine::detail::rectilinear_grid
40//==============================================================================
41#endif
Definition: rectilinear_grid.h:38
Definition: vtp_writer.h:3
typename detail::rectilinear_grid::creator< IndexableSpace, N >::type creator_t
Definition: creator.h:37
Definition: algorithm.h:6
static constexpr auto create(std::index_sequence< Seq... >, Args &&... args)
Definition: creator.h:20
static constexpr auto create(Args &&... args)
Definition: creator.h:27
decltype(create()) type
Definition: creator.h:32