title: Issue when trying to stock a socket into a structure
body: <p>I'm trying to store a socket into a structure. I thought this would be straight-forward but the fact that socket don't have constructor (as I understood) make this thing very tricky for me.
  Here's what I tried:</p>
  <pre><code>    struct participants_name {
        participants_name(tcp::socket);
        chat_participant_ptr _participant;
        std::string name;
        std::string password;
        bool logged_in;
        tcp::socket socket_;
        std::map&lt;std::string, contacts_&gt; contacts;
      };
  
  
  participants_name::participants_name(tcp::socket socket): socket_(std::move(socket))
  {
  
  }
  
  void chat_session::add_participants(chat_participant_ptr chat_participant)
  {
    this-&gt;participants[chat_participant] = participants_name(std::move(socket_));
    this-&gt;participants[chat_participant]._participant = chat_participant;
    this-&gt;participants[chat_participant].logged_in = false;
  
    std::cout &lt;&lt; &quot;Participant &quot;&lt;&lt; chat_participant &lt;&lt; &quot; has connected\n&quot;;
  }
  </code></pre>
  <p>Here is what the session looks like:</p>
  <pre><code>class chat_session : public chat_participant,
      public std::enable_shared_from_this&lt;chat_session&gt;
  {
    public:
         
      chat_session::chat_session(tcp::socket socket, chat_room&amp; room,
        std::map&lt;chat_participant_ptr, participants_name&gt; 
        &amp;participants_):
        socket_(std::move(socket)), room_(room), 
        participants(participants_)
      {
        commands[&quot;LOGIN&quot;] = &amp;chat_session::login;
        commands[&quot;ADDCONTACT&quot;] = &amp;chat_session::add_friend;
      }
  
      void start();
      void chat_session::add_participants(chat_participant_ptr chat_participant)
  
  
      [...... A few methods here ..... ]
  
  
      typedef void (chat_session::*cmdfunctions)(std::string, chat_participant_ptr);
      typedef std::map&lt;std::string, cmdfunctions&gt; functions_map;
  
      functions_map commands;
      tcp::socket socket_;
      chat_room room_;
      std::map&lt;chat_participant_ptr, participants_name&gt; &amp;participants;
      chat_message read_msg_;
      chat_message_queue write_msgs_;
  };
  
  class chat_server
  {
  public:
    chat_server(boost::asio::io_service&amp; io_service,
        const tcp::endpoint&amp; endpoint)
      : acceptor_(io_service, endpoint),
        socket_(io_service) { do_accept(); }
  
  private:
    void do_accept();
    tcp::acceptor acceptor_;
    tcp::socket socket_;
    chat_room room_;
    std::map&lt;chat_participant_ptr, participants_name&gt; participants;
  
  };
  </code></pre>
  <p>Here is what the compiler complains about:
  [...]
  /usr/include/c++/10.2.0/tuple:1689:70: error: no matching function for call to ‘participants_name::participants_name()’
  1689 |         second(std::forward&lt;_Args2&gt;(std::get&lt;_Indexes2&gt;(__tuple2))...)</p>
  <p>I've tried many things but nothing works, any help would be appreciated!</p>