-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[libc++] ABI compat breakage using reference type for std::set key_compare #118559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I am personally surprised by how alignof works on references, but it is consistent with
|
|
I tend to agree; however, from that point of view, I think a deliberate compile-time error is better than the ABI break (documented or not). |
…rence comparators While reference comparators are a terrible idea and it's not entirely clear whether they are supported, fixing the unintended ABI break is straightforward so we should do it as a first step. Fixes llvm#118559
I do agree that reference comparators are a terrible idea. But this was an unintended ABI break and (unless I missed something) this is easy to address, at least until we officially decide to make such comparators ill-formed: #118685 |
The following compiled fine with libc++ version 19:
It no longer compiles with libc++ trunk (https://godbolt.org/z/cTbEovcer). It seems the size of
MySet
has changed because of a change instd::set
.The draft release notes (https://libcxx.llvm.org/ReleaseNotes.html#abi-affecting-changes) mention issues with overaligned empty types, but nothing about reference types.
The text was updated successfully, but these errors were encountered: