Created on 2019-11-07.00:00:00 last changed 45 months ago
Proposed resolution:
This wording is relative to N4835.
Add
#include <compare>
to the following header synopses:
[ 2019-11 Moved to Ready on Friday AM in Belfast ]
Addresses US 181
The spaceship operator<=> is typically not usable unless the library header <compare> is directly included by the user. Many standard library headers provide overloads for this operator. Worse, several standard classes have replaced their existing definition for comparison operators with a reliance on the spaceship operator, and existing code will break if the necessary header is not (transitively) included. In a manner similar to the mandated library headers transitively #include-ing <initializer_list> in C++11, these headers should mandate a transitive #include <compare>.
Proposed change: Add: #include <compare> to the header synopsis for each of the following headers:<array> <chrono> <coroutine> <deque> <forward_list> <filesystem> <iterator> <list> <map> <memory> <optional> <queue> <ranges> <regex> <set> <stack> <string> <string_view> <system_error> <thread> <tuple> <type_index> <unordered_map> <unordered_set> <utility> <variant> <vector>
History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2020-02-24 16:02:59 | admin | set | status: voting -> wp |
2020-01-17 04:54:50 | admin | set | status: ready -> voting |
2019-11-08 12:06:23 | admin | set | messages: + msg10806 |
2019-11-08 12:06:23 | admin | set | status: new -> ready |
2019-11-07 20:51:54 | admin | set | messages: + msg10801 |
2019-11-07 00:00:00 | admin | create |