From Jason Turner

[mdspan.layout.stride.overview]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpn_c4gk05/{from.md → to.md} +14 -3
tmp/tmpn_c4gk05/{from.md → to.md} RENAMED
@@ -7,13 +7,13 @@ user-defined.
7
  namespace std {
8
  template<class Extents>
9
  class layout_stride::mapping {
10
  public:
11
  using extents_type = Extents;
12
- using index_type = typename extents_type::index_type;
13
- using size_type = typename extents_type::size_type;
14
- using rank_type = typename extents_type::rank_type;
15
  using layout_type = layout_stride;
16
 
17
  private:
18
  static constexpr rank_type rank_ = extents_type::rank(); // exposition only
19
 
@@ -54,10 +54,21 @@ namespace std {
54
  friend constexpr bool operator==(const mapping&, const OtherMapping&) noexcept;
55
 
56
  private:
57
  extents_type extents_{}; // exposition only
58
  array<index_type, rank_> strides_{}; // exposition only
 
 
 
 
 
 
 
 
 
 
 
59
  };
60
  }
61
  ```
62
 
63
  If `Extents` is not a specialization of `extents`, then the program is
 
7
  namespace std {
8
  template<class Extents>
9
  class layout_stride::mapping {
10
  public:
11
  using extents_type = Extents;
12
+ using index_type = extents_type::index_type;
13
+ using size_type = extents_type::size_type;
14
+ using rank_type = extents_type::rank_type;
15
  using layout_type = layout_stride;
16
 
17
  private:
18
  static constexpr rank_type rank_ = extents_type::rank(); // exposition only
19
 
 
54
  friend constexpr bool operator==(const mapping&, const OtherMapping&) noexcept;
55
 
56
  private:
57
  extents_type extents_{}; // exposition only
58
  array<index_type, rank_> strides_{}; // exposition only
59
+
60
+ // [mdspan.sub.map], submdspan mapping specialization
61
+ template<class... SliceSpecifiers>
62
+ constexpr auto submdspan-mapping-impl(SliceSpecifiers...) const // exposition only
63
+ -> see below;
64
+
65
+ template<class... SliceSpecifiers>
66
+ friend constexpr auto submdspan_mapping(
67
+ const mapping& src, SliceSpecifiers... slices) {
68
+ return src.submdspan-mapping-impl(slices...);
69
+ }
70
  };
71
  }
72
  ```
73
 
74
  If `Extents` is not a specialization of `extents`, then the program is