diff --git a/xml/issue4314.xml b/xml/issue4314.xml index 1807e2eafe..907be69054 100644 --- a/xml/issue4314.xml +++ b/xml/issue4314.xml @@ -84,9 +84,8 @@ validate if input value is representable. We should require convertibility without regard to const and value category.

- - +

This wording is relative to .

@@ -288,7 +287,237 @@ constexpr mapping(const extents_type& ext, OtherIndexType padding + +
+ +2025-10-05; Tomasz provides upated wording after LWG review + + + + +

+This wording is relative to . +

+ +
    + +
  1. Modify as indicated:

    + +
    +
    +template<class OtherIndexType>
    +  static constexpr auto index-cast(OtherIndexType&& i) noexcept;
    +
    +
    +

    +-9- Effects:

      +
    • -9.1- If `OtherIndexType` is an integral type other than `bool`, then equivalent to `return i;`,
    • +
    • -9.2- otherwise, equivalent to return static_cast<index_type>(std::move(i));.
    • +
    +

    +
    +
    +
  2. + +
  3. Modify as indicated:

    + +
    +
    +template<class... Indices>
    +  constexpr index_type operator()(Indices... i) const noexcept;
    +
    +
    +

    +-2- Constraints: […] +

    +-3- Preconditions: […] +

    +-4- Effects: Let `P` be a parameter pack such that +

    +
    +is_same_v<index_sequence_for<Indices...>, index_sequence<P...>>
    +
    +

    +is `true`. Equivalent to: +

    +
    +return ((static_cast<index_type>(std::move(i)) * stride(P)) + ... + 0);
    +
    +
    +
    + +
  4. + +
  5. Modify as indicated:

    + +
    +
    +template<class... Indices>
    +  constexpr index_type operator()(Indices... i) const noexcept;
    +
    +
    +

    +-2- Constraints: […] +

    +-3- Preconditions: […] +

    +-4- Effects: Let `P` be a parameter pack such that +

    +
    +is_same_v<index_sequence_for<Indices...>, index_sequence<P...>>
    +
    +

    +is `true`. Equivalent to: +

    +
    +return ((static_cast<index_type>(std::move(i)) * stride(P)) + ... + 0);
    +
    +
    +
    + +
  6. + +
  7. Modify as indicated:

    + +
    +
    +template<class... Indices>
    +  constexpr index_type operator()(Indices... i) const noexcept;
    +
    +
    +

    +-2- Constraints: […] +

    +-3- Preconditions: […] +

    +-4- Effects: Let `P` be a parameter pack such that +

    +
    +is_same_v<index_sequence_for<Indices...>, index_sequence<P...>>
    +
    +

    +is `true`. Equivalent to: +

    +
    +return ((static_cast<index_type>(std::move(i)) * stride(P)) + ... + 0);
    +
    +
    +
    + +
  8. + +
  9. Modify as indicated:

    + +
    +
    +template<class... Indices>
    +  constexpr index_type operator()(Indices... idxs) const noexcept;
    +
    +
    +

    +-3- Constraints: […] +

    +-4- Preconditions: […] +

    +-5- Returns: ((static_cast<index_type>(std::move(idxs)) * stride(P_rank)) + ... + 0). +

    +
    +
    + +
  10. + +
  11. Modify as indicated:

    + +
    +
    +template<class... Indices>
    +  constexpr index_type operator()(Indices... idxs) const noexcept;
    +
    +
    +

    +-3- Constraints: […] +

    +-4- Preconditions: […] +

    +-5- Returns: ((static_cast<index_type>(std::move(idxs)) * stride(P_rank)) + ... + 0). +

    +
    +
    + +
  12. + +
  13. Modify as indicated:

    + +
    +
    +template<class OtherIndexType>
    +constexpr mapping(const extents_type& ext, OtherIndexType padding);
    +
    +
    +

    +Let pad be extents_type::index-cast(std::move(padding)). +

    +-3- Constraints: […] +

    +-4- Preconditions: +

    +
      +
    1. (4.1) — pad is representable as a value of type `index_type`.

    2. +
    3. (4.2) — extents_type::index-cast(pad)pad is greater than zero.

    4. +
    5. (4.3) — If rank_ is greater than one, then +LEAST-MULTIPLE-AT-LEAST(pad, ext.extent(0)) is representable as a value of type `index_type`.

    6. +
    7. (4.4) — If rank_ is greater than one, then the product of +LEAST-MULTIPLE-AT-LEAST(pad, ext.extent(0)) and all values ext.extent(k) with +k in the range of [1, rank_) is representable as a value of type `index_type`.

    8. +
    9. (4.5) — If `padding_value` is not equal to `dynamic_extent`, `padding_value` equals +extents_type::index-cast(pad)pad.

    10. +
    +

    +-5- Effects: Direct-non-list-initializes `extents_` with `ext`, and if `rank_` is greater than one, +direct-non-list-initializes stride-rm2 with LEAST-MULTIPLE-AT-LEAST(pad, ext.extent(rank_ - 1)). +

    +
    +
    + +
  14. + +
  15. Modify as indicated:

    + +
    +
    +template<class OtherIndexType>
    +constexpr mapping(const extents_type& ext, OtherIndexType padding);
    +
    +
    +

    +Let pad be extents_type::index-cast(std::move(padding)). +

    +-3- Constraints: […] +

    +-4- Preconditions: +

    +
      +
    1. (4.1) — pad is representable as a value of type `index_type`.

    2. +
    3. (4.2) — extents_type::index-cast(pad)pad is greater than zero.

    4. +
    5. (4.3) — If rank_ is greater than one, then +LEAST-MULTIPLE-AT-LEAST(pad, ext.extent(rank_ - 1)) is representable as a value of type `index_type`.

    6. +
    7. (4.4) — If rank_ is greater than one, then the product of +LEAST-MULTIPLE-AT-LEAST(pad, ext.extent(rank_ - 1)) and all values ext.extent(k) with +k in the range of [1, rank_ - 1) is representable as a value of type `index_type`.

    8. +
    9. (4.5) — If `padding_value` is not equal to `dynamic_extent`, `padding_value` equals +extents_type::index-cast(pad)pad.

    10. +
    +

    +-5- Effects: Direct-non-list-initializes `extents_` with `ext`, and if `rank_` is greater than one, +direct-non-list-initializes stride-rm2 with LEAST-MULTIPLE-AT-LEAST(pad, ext.extent(rank_ - 1)). +

    +
    +
    + +
  16. +
+