title: "error: no matching function for call to" when constructing an unintialized struct
body: <p>I'm trying to use a <a href="http://www.boost.org/doc/libs/1_54_0/doc/html/boost/lockfree/spsc_queue.html" rel="noreferrer"><code>boost::lockfree::spsc_queue</code></a> with this <a href="https://github.com/zaphoyd/websocketpp/blob/master/examples/broadcast_server/broadcast_server.cpp" rel="noreferrer">websocket server</a> instead of a <code>std::queue</code> for <code>m_actions</code> to contain this <code>struct</code>:</p>
  
  <pre><code>enum action_type {
      SUBSCRIBE,
      UNSUBSCRIBE,
      MESSAGE
  };
  
  struct action {
      action(action_type t, connection_hdl h) : type(t), hdl(h) {}
      action(action_type t, server::message_ptr m) : type(t), msg(m) {}
  
      action_type type;
      websocketpp::connection_hdl hdl;
      server::message_ptr msg;
  };
  </code></pre>
  
  <p>I cannot initialize this <code>struct</code> inline with </p>
  
  <pre><code>action a = m_actions.front();
  </code></pre>
  
  <p>because <code>spsc_queue</code> does not have that function but uses <code>void pop</code> to both set the object and <code>return boolean</code> for looping.</p>
  
  <p>When I try to </p>
  
  <pre><code>action a;
  while(m_actions.pop(a)){
      ...
  </code></pre>
  
  <p><code>gcc</code> says: </p>
  
  <pre><code>position_server.cpp:106:11: error: no matching function for call to ‘action::action()’
  position_server.cpp:106:11: note: candidates are:
  position_server.cpp:39:5: note: action::action(action_type, websocketpp::endpoint&lt;websocketpp::connection&lt;websocketpp::config::asio&gt;, websocketpp::config::asio&gt;::message_ptr)
  position_server.cpp:39:5: note:   candidate expects 2 arguments, 0 provided
  position_server.cpp:38:5: note: action::action(action_type, websocketpp::connection_hdl)
  position_server.cpp:38:5: note:   candidate expects 2 arguments, 0 provided
  position_server.cpp:37:8: note: action::action(const action&amp;)
  position_server.cpp:37:8: note:   candidate expects 1 argument, 0 provided
  </code></pre>
  
  <p>How can an <code>action</code> be constructed and then set with <code>spsc_queue.pop()</code>?</p>