Issue 171551
Summary [libc++] Questionable `noexcept(false)` destructors of containers and container adaptors
Labels question, libc++
Assignees
Reporter frederick-vs-ja
    We're verifying in tests that some containers and container adaptors in lib++ have potentially-throwing (`noexcept(false)`) destructors if their allocators or comparison functors have `noexcept(false)` destructors.

https://github.com/llvm/llvm-project/blob/b3a5ad14bff5888b6095dbfe31b6ff0bf1200d30/libcxx/test/std/containers/sequences/vector/vector.cons/dtor_noexcept.pass.cpp#L44-L49

https://github.com/llvm/llvm-project/blob/b3a5ad14bff5888b6095dbfe31b6ff0bf1200d30/libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/dtor_noexcept.pass.cpp#L52-L58

This doesn't conform to [[res.on.exception.handling]/3](https://eel.is/c++draft/res.on.exception.handling#3). Should we fix our destructors or submit an LWG issue to allow this? [LWG3229](https://cplusplus.github.io/LWG/issue3229) and [LWG3854](https://cplusplus.github.io/LWG/issue3854) are related, but I don't think they talked about allowing potentially-throwing destructors for containers.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to