Created on 2022-06-08.00:00:00 last changed 7 months ago
Proposed resolution (approved by CWG 2023-06-17):
Change in 11.4.4 [special] paragraph 6 as follows:
An eligible special member function is a special member function for which:
- the function is not deleted,
- the associated constraints (13.5 [temp.constr]), if any, are satisfied, and
- no special member function of the same kind whose associated constraints, if any, are satisfied is more constrained (13.5.5 [temp.constr.order]).
[Accepted as a DR at the November, 2023 meeting.]
Consider:
#include <type_traits> template<typename T> concept Int = std::is_same_v<T, int>; template<typename T> concept Float = std::is_same_v<T, float>; template<typename T> struct Foo { Foo() requires Int<T> = default; // #1 Foo() requires Int<T> || Float<T> = default; // #2 };
Per the wording, #1 is not eligible for Foo<float>, because the constraints are not satisfied. But #2 also is not eligible, because #1 is more constrained than #2. The intent is that #2 is eligible.
History | |||
---|---|---|---|
Date | User | Action | Args |
2024-04-05 21:43:46 | admin | set | status: dr -> drwp |
2023-12-19 10:15:28 | admin | set | status: ready -> dr |
2023-11-10 14:27:11 | admin | set | status: tentatively ready -> ready |
2023-06-20 19:34:52 | admin | set | status: open -> tentatively ready |
2022-06-08 15:45:43 | admin | set | messages: + msg6848 |
2022-06-08 00:00:00 | admin | create |