[libcxx-commits] [libcxx] [libc++] Ensure that `std::expected` has no tail padding (PR #69673)
Jan Kokemüller via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Nov 2 13:07:20 PDT 2023
================
@@ -88,8 +88,263 @@ _LIBCPP_HIDE_FROM_ABI void __throw_bad_expected_access(_Arg&& __arg) {
# endif
}
+struct __expected_invoke_tag {};
+
+template <bool _NoUnique, class _Tp>
+class __expected_conditional_no_unique_address {
----------------
jiixyj wrote:
I added a bit of text explaining that this class _must_ be used like this, with `[[no_unique_address]]` in front:
```c++
[[no_unique_address]] __conditional_no_unique_address<...
```
https://github.com/llvm/llvm-project/pull/69673
More information about the libcxx-commits
mailing list