<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/168724>168724</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            CppCon performance not quite true?
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          kelbon
      </td>
    </tr>
</table>

<pre>
    It strange issue, but there are CppCon video about libc++ shipped with clang:

https://www.youtube.com/watch?v=iw8hqKftP4I

And in first 9 minutes speaker says, that this code should compile on clang with libc++:

```cpp
template<typename V, typename E>
struct EX {
  union U {
    [[no_unique_address]] V v;
    [[no_unique_address]] E e;
  };
 [[no_unique_address]] U u_;
  bool has_val_;
};

struct mystruct {
  int x;
  bool y;
  char z;
};

static_assert(sizeof(EX<mystruct, int>) == 8); // 12 in reality
```

But its not. Sizeof == 8, and i agree with compiler here

I also checked with std::expected itself:

```cpp
#include <expected>

struct mystruct {
  int x;
  bool y;
  char z;
};


mystruct foo();

std::expected<mystruct, int> compute() {
  return foo();
}

static_assert(sizeof(std::expected<mystruct, int>) == 12); // again, 12

```

https://godbolt.org/z/jPfbMqchW

A talk generally good, but this first part (9 minutes) confuses me.

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJysVE2P2zYQ_TXjyyCGRFr-OOjgjzWwKAoEKJLmZlDiyGKWJrXk0I731xeyZe9mu21zKCDAGoHz5vHN81Mxmr0jKqFYQbEZqcStD-UT2cq7UeX1uXxkjByU2xOaGBOBWGOVGLmlQKgC4brr1t7h0WjyqCqfGK2pahArECuMrek60ngy3GJtlduDXELWPy1zF_tKbEFsT6fT-OwTp4rGtT_0XxTXLcjtEeTGnObt828Nf548XpuXTqNx2JgQGRd4MC4xRYwdqScKGNU59lS5VT1XE7H2mjC2PlmNtT90xhJ6d6V0ZffK-k4Rptn1qbsOsiXTobOKCeSazx05dSD8ehlzqx5APkC2jBxSzfjwDWG2gmyJmJzxDr_ca8SL5ivnd8mZ50Q7pXWgGKHYQLHBr3gE-WtHH5BuR2G2GV7_veULpt2tp_LeYqvi7qjs8PEO83qVw3l4uV3AOMYfP2Gcb1XdqoAvH0EpNvVOxUiBQcyjeSHfgJg_fAO5vk3o9TSOeyHFAkFuQG5wDmIBcoVXr2Au-uUHUtbw-e2eroNWidFwROd5jH9cprwBWqPqzYNqH4gGY14NEbB39RXjEZWNHuuW6qebfyPr3hpyST86qpl0P4Vs809-ASGNq23ShCDXt6arRf5faSFb3mEa70EMgt0GveP9odwXFRLTtfnOJhCn4P6GOtv8x1J_beibHefi5yWrvTKuP5mLd-p-lB97rytveezDHsT2BcT2--em-v25bv8cEgNZ2Sfck6OgrD3j3nv9GmcmDmHSqcAIYn4PlZ5i7V2TIkU80Biy5UiXUi_kQo2ozGdTWUyn01yO2lLXM51RM1vovJnN9aRYTCbNopo08zzTuhAjU4pMFHmeL_JCTot8XGSVnM50I6Qu5CLTMMnooIwdW3s89LcZXXK3zKfzmZiMrKrIxktgC-HodEtl0ed3KPumT1XaR5hk1kSOrzBs2FI5pHVHofHhoFxN_b8En5NhQg6JQG5HKdjynbqG21QNwdxDDj-fuuC_U7_Q7YVIBLEdmB5L8VcAAAD__39F8b0">