Title
<numeric> should include <compare>
Status
new
Section
[numeric.ops.overview]
Submitter
Sergey Zubkov

Created on 2026-11-23.00:00:00 last changed yesterday

Messages

Date: 2026-11-27.15:09:55

Proposed resolution:

This wording is relative to N5054.

  1. Modify the header <numeric> synopsis in [numeric.ops.overview] as indicated:

    // mostly freestanding
    #include <compare> // see [compare.syn]
    
    namespace std {
      […]
    }
    
Date: 2026-11-23.00:00:00

It was pointed out in https://github.com/cplusplus/draft/pull/9422#discussion_r4659309235 that `std::wide_result` has operator<=>, but header <numeric> does not include <compare>, which is inconsistent. LWG 4416 recently added #include <compare> to <meta> for the same kind of reason.

History
Date User Action Args
2026-11-27 15:09:55adminsetmessages: + msg16672
2026-11-23 00:00:00admincreate