| Issue |
204617
|
| Summary |
[libc++] __tree move and move-assign cannot be used in constant evaluation when the key type has a const-qualified subobject
|
| Labels |
libc++
|
| Assignees |
|
| Reporter |
ldionne
|
Move-construction and move-assignment in `__tree` can't run in constant evaluation since the `value_type` contains a `const` subobject (i.e. `value_type` is `pair<const Key, T>`). Inside `__tree`, we try to assign over the `const` member, which is technically UB and not allowed during constexpr.
A few tests in the associative containers are currently disabled because of that. This issue is an anchor for these FIXMEs.
The fix would involve rewriting the value-replacement step in `__tree`'s move paths to be constexpr-friendly (maybe destroy + construct_at when constant evaluated?).
Originating PRs:
- #134330
- #161901
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs