Title
[fund.ts.v2] gcd / lcm and bool
Status
open
Section
[numeric.ops.gcd][numeric.ops.lcm]
Submitter
Richard Smith

Created on 2016-06-15.00:00:00 last changed 84 months ago

Messages

Date: 2016-08-02.17:19:11

Proposed resolution:

This wording is relative to N4600.

  1. Adjust [numeric.ops.gcd] p3 as indicated:

    template<class M, class N>
      constexpr common_type_t<M, N> gcd(M m, N n);
    

    […]

    -3- Remarks: If either M or N is not an integer type, or if either is (possibly cv-qualified) bool, the program is ill-formed.

  2. Adjust [numeric.ops.lcm] p3 as indicated:

    template<class M, class N>
      constexpr common_type_t<M, N> lcm(M m, N n);
    

    […]

    -3- Remarks: If either M or N is not an integer type, or if either is (possibly cv-qualified) bool, the program is ill-formed.

Date: 2016-08-02.17:19:11

[ 2016-08, Chicago ]

Monday PM: Moved to Tentatively Ready

Date: 2016-08-15.00:00:00

[ 2016-08-01, Walter Brown suggests wording ]

A corresponding issue has been added addressing the WP, see LWG 2759.

Date: 2016-06-15.00:00:00

Addresses: fund.ts.v2

According to N4562, gcd and lcm support bool as the operand type. The wording doesn't appear to cover the behavior for that case, since bool does not have a zero value and gcd / lcm are not normally mathematically defined over {false, true}.

Presumably gcd and lcm shouldn't accept arguments of type bool.

History
Date User Action Args
2017-07-30 20:10:41adminsetstatus: wp -> open
2016-11-14 03:59:28adminsetstatus: pending -> wp
2016-11-14 03:55:22adminsetstatus: ready -> pending
2016-08-02 17:19:11adminsetmessages: + msg8334
2016-08-02 17:19:11adminsetstatus: new -> ready
2016-08-01 18:44:20adminsetmessages: + msg8295
2016-08-01 18:44:20adminsetmessages: + msg8294
2016-06-15 00:00:00admincreate