Details
- Reviewers
ldionne zoecarver - Group Reviewers
Restricted Project - Commits
- rGc93a531caeae: [libcxx][test] tests for strengthened `noexcept` are non-portable
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I actually don't see any textual support for our metaprogrammy conditional-noexcepts in view_interface at all. @zoecarver if you're still around, what was the rationale for all the conditional-noexcept in D101737? Would anything important break if we just got rid of it all?
Not only would removing the noexcept-specifications be simpler, safer, and faster-to-compile, but it would also jibe with @ldionne's general philosophy of keeping as close to the Standard as possible. The Standard doesn't say that these functions should ever be noexcept, so by making ours sometimes-noexcept, we might be opening up portability pitfalls for libc++'s users.
IIRC the idea was to make functions noexcept as much as we could because that's conforming and we thought that we'd never actually want to do anything else but terminate if an exception was thrown from those. But revisiting this, I agree it's a weird choice to have made and I would support removing the non-required noexcepts (in particular the conditional ones that add complexity). @Quuxplusone if you want to make a pass at those, be my guest, I'll be happy to review.
In the meantime, this looks OK to me since that behavior is indeed libc++ specific. I think the CI failure is OK to ignore.