From aea2fbbad359501acda6e0b02daae135f97aefdb Mon Sep 17 00:00:00 2001 From: Casey Carter Date: Fri, 31 Jul 2020 20:51:09 -0700 Subject: [PATCH 1/2] 3403: Update P/R per reflector discussion --- xml/issue3403.xml | 64 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 3 deletions(-) diff --git a/xml/issue3403.xml b/xml/issue3403.xml index baf72e39f7..6a913c8266 100644 --- a/xml/issue3403.xml +++ b/xml/issue3403.xml @@ -30,6 +30,63 @@ expression, I think it's an improvement?

Priority to 2 after reflector discussion.

2020-07-22 Casey provides wording + +

Previous resolution [SUPERSEDED]:

+
+

+This wording is relative to N4861. +

+ +
    +
  1. Add a new paragraph after paragraph 1 in :

    +
    + +-?- Also within this clause, +make-signed-like-t<X> +for an integer-like type X +denotes make_signed_t<X> +if X is an integer type; +otherwise, it denotes a corresponding +unspecified signed-integer-like type +of the same width as X. + +
    +
  2. + +
  3. Modify as indicated:

    + +
    +

    -1- The name ranges::ssize denotes +a customization point object (). +The expression ranges::ssize(E) +for a subexpression E of type T +is expression-equivalent to: +

    +(1.1) — If range_difference_t<T> has +width less than ptrdiff_t, +static_cast<ptrdiff_t>(ranges::size(E)). +

    +(1.2) — Otherwise, +static_cast<range_difference_t<T>>(ranges::size(E)). +

    + +-?- Given a subexpression E with type T, +let t be an lvalue that denotes the reified object for E. +If ranges::size(t) is ill-formed, +ranges::ssize(E) is ill-formed. +Otherwise, let D be the wider of +ptrdiff_t or decltype(ranges::size(t)); +ranges::ssize(E) is expression-equivalent to +static_cast<make-signed-like-t<D>>(ranges::size(t)). + +

    +
    +
  4. +
+
+ +2020-07-31 Casey provides updated wording +Per discussion on the reflector. @@ -81,10 +138,11 @@ width less than ptrdiff_t, let t be an lvalue that denotes the reified object for E. If ranges::size(t) is ill-formed, ranges::ssize(E) is ill-formed. -Otherwise, let D be the wider of -ptrdiff_t or decltype(ranges::size(t)); +Otherwise let D be +make-signed-like-t<decltype(ranges::size(t))>, +or ptrdiff_t if it is wider than that type; ranges::ssize(E) is expression-equivalent to -static_cast<make-signed-like-t<D>>(ranges::size(t)). +static_cast<D>(ranges::size(t)).

From 72937103ed0c9dca6b35cf1a2f96a0aaf77e32e9 Mon Sep 17 00:00:00 2001 From: Casey Carter Date: Fri, 31 Jul 2020 22:24:51 -0700 Subject: [PATCH 2/2] Properly capitalize Clause --- xml/issue3403.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/issue3403.xml b/xml/issue3403.xml index 6a913c8266..583b2f4547 100644 --- a/xml/issue3403.xml +++ b/xml/issue3403.xml @@ -105,7 +105,7 @@ since we don't need it at this time.]
--?- Also within this clause, +-?- Also within this Clause, make-signed-like-t<X> for an integer-like type X denotes make_signed_t<X>