title: copy assignment operator implicitly deleted because field has a deleted copy assignment operator
body: <p>I'm getting this error as soon as I define a destructor, but without that the compilation succeed, but I badly want to define destructor to debug some seg faults.</p>
  <pre><code>class Socket {
      private:
          seastar::output_stream&lt;char&gt; socket;
  
      public:
          std::string peer;
      public:
          Socket() = default;
  
          template &lt;typename... Args&gt;
          explicit Socket(seastar::output_stream&lt;char&gt; &amp;&amp;s, std::string p) : socket(std::move(s)), peer(p) {}
  
          ~Socket() {
              std::cout &lt;&lt; &quot;Socket has gone out of scope&quot; &lt;&lt; &quot;\n&quot;;
          }
  
          seastar::future&lt;&gt; send(std::string message) {
              co_await socket.write(message);
              co_await socket.flush();
          }
  
          seastar::future&lt;&gt; close() {
              co_await socket.close();
          }
  };
  </code></pre>
  <p>Compilation fails with,</p>
  <pre><code>error: object of type 'Socket' cannot be assigned because its copy assignment operator is implicitly deleted
          connection-&gt;second.socketObj = std::move(socketObj);
                                    ^
  ./socketwrapper.h:44:46: note: copy assignment operator of 'Socket' is implicitly deleted because field 'socket' has a deleted copy assignment operator
                  seastar::output_stream&lt;char&gt; socket;
  </code></pre>
  <p>Is there anyway to fix this issue?</p>