title: How am I misunderstanding the C++ standard regarding "trivially copyable"?
body: <p>The static assert in the code below fails.</p>
  <p>Of course, I know that this is because of the user-provided move constructor in Bar.</p>
  <pre><code>#include &lt;type_traits&gt;
  
  using namespace std;
  
  struct Bar
  {
  public:
      Bar()               = default;
      Bar(const Bar&amp;)     = default;
      ~Bar()              = default;
  
      Bar(Bar&amp;&amp;)
      {
      }
  };
  
  struct Foo
  {
      Bar b;
  
      Foo()                           = default;
     ~Foo()                           = default;
      Foo(const Foo&amp;)                 = default;
      Foo(Foo&amp;&amp;)                      = delete;
      Foo &amp; operator= (Foo &amp;&amp; )       = delete;
      Foo &amp; operator= (const Foo &amp; )  = delete;
  };
  
  
  static_assert(is_trivially_copyable_v&lt;Foo&gt;);  // Fails
  
  </code></pre>
  <p>What I don't understand is how to interpret the standard regarding trivial copyability.  From the C++ 17 standard:</p>
  <blockquote>
  <p>A trivially copyable class is a class:</p>
  <p>(6.1)
  where each copy constructor, move constructor, copy assignment operator, and move assignment operator ([class.copy], [over.ass]) is either deleted or trivial,</p>
  <p>(6.2)
  that has at least one non-deleted copy constructor, move constructor, copy assignment operator, or move assignment operator, and</p>
  <p>(6.3)
  that has a trivial, non-deleted destructor.</p>
  </blockquote>
  <p>It seems to me the Foo meets these criteria:</p>
  <p>6.1: They're all deleted except the copy constructor which is trivial. Bar also has a trivial copy constuctor, so that should ensure the Foo copy contructor is truly trivial.</p>
  <p>6.2: The defaulted copy constructor</p>
  <p>6.3: Foo destructor is defaulted and so is the Bar one, so the destructor should be trivial.</p>
  <p>What am I not getting?</p>
  <p>By the way I'm not actually trying to do anything apart from better understand the standard.</p>