`<optional>`: Relational and equality operators are constrained before C++26
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 1.7k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 22
Description
MSVC STL constrains some operator==, operator< etc. for optional in C++17~23 modes, while the standard doesn't constrain them until C++26 (via WG21-P2944R3).
Should we
- just remove the SFINAE constraints before C++26, or
- backport the constraints in C++26 added via WG21-P2944R3 and following-up LWG issues, but only for
optional, or - backport all constraints added via WG21-P2944R3, WG21-P3379R0 (for consistency), and following-up LWG issues?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the optional relational and equality operator behavior in C++17–23 and C++26, then compare the alternatives against WG21-P2944R3, WG21-P3379R0, and the referenced LWG issues. Done requires an agreed scope for the constraints and conformance validation across the affected language modes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100