<div dir="ltr">Example:<br><br><div>  struct foo {</div><div>    foo(foo &&) = default;</div><div>    foo &operator=(foo &&) = default;</div><div>  };</div><div><br></div><div>  static_assert(__is_trivially_copyable(foo), "this really shouldn't be true");<br><br>This static-assert succeeds, yet the code:<br><br>  void f(foo &x, foo &y) {<br>    x = y;</div><div>  }<br><br>fails.<br><br>This came up when someone on IRC tried to make a SmallVector of such things and LLVM's isPodLike trait said "yes, this thing is podlike" and tried to use std::copy to copy them around (& that was just luck that it failed - in other places it used memcpy to copy them around, which would've been silent badness). isPodLike is implemented in terms of __is_trivially_copyable, where available. (granted, it's implemented in terms of is_class where that's not available - so we don't have any code that /relies/ on the correctness of __is_trivially_copyable, only for optimization purposes)<br><br>Am I seeing that right? <br><br>- Dave</div></div>