[libcxx-commits] [libcxx] [libc++] Fix UB in <expected> related to "has value" flag (#68552) (PR #68733)

via libcxx-commits libcxx-commits at lists.llvm.org
Sat Oct 14 14:27:34 PDT 2023


https://github.com/huixie90 commented:

What if a user have the following
```
struct Foo {
 [[no_unique_address]] std::expected<std::optional<int>, int> x_;
 [[no_unique_address]] bool y_;
};
```
would the operations on the `x_` overwrite `y_`? from what I understand it will

https://github.com/llvm/llvm-project/pull/68733


More information about the libcxx-commits mailing list