Comparison operators are not allowed to be defaulted if they were previously declared outside the class.
Pretty low-impact, but it's nice to reject this without a linking error.
Fixes https://github.com/llvm/llvm-project/issues/51227.
Details
Details
- Reviewers
ChuanqiXu - Group Reviewers
Restricted Project - Commits
- rG6a763343e29f: [Clang] Reject in-class defaulting of previously declared comparison operators
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Interesting it looks like neither gcc nor MSVC diagnose this either but it looks correct to me.