Title
midpoint should not constrain T is complete
Status
new
Section
[numeric.ops.midpoint]
Submitter
Paolo Torres

Created on 2019-04-10.00:00:00, last changed 2019-06-10.05:16:56.

Messages

Date: 2019-06-10.05:16:56

Proposed resolution:

This wording is relative to N4810.

  1. Modify [numeric.ops.midpoint] as indicated:

    template<class T>
      constexpr T* midpoint(T* a, T* b);
    

    -4- Constraints: T is an complete object type.

    -?- Mandates: T is a complete type.

    […]

Date: 2019-06-12.00:00:00

[ 2019-06-12 Priority set to 2 after reflector discussion ]

Date: 2019-04-10.00:00:00

The constraint of the midpoint overload in [numeric.ops.midpoint]:

template<class T>
constexpr T* midpoint(T* a, T* b);

-4- Constraints: T is a complete object type.

is incorrect. Paragraph 4 states T is constrained to be a complete object type, however it does not seem to be possible to implement T is complete. This means behavior is conditioned dependent on whether a type is complete, and this seems inconsistent with the library precedent.

History
Date User Action Args
2019-06-10 05:16:56adminsetmessages: + msg10432
2019-04-13 16:42:43adminsetmessages: + msg10391
2019-04-10 00:00:00admincreate