title: boost asio acceptor.accept invalid argument
body: <p>i am trying to code with boost asio in socket programming.</p>
  
  <p>after setting boost in my ubuntu eclipse environment, i tried the sample code in boost web site.</p>
  
  <p>but an error occur on acceptor.accept() function with invalid argument, like below</p>
  
  <p>how can i fix this error ?</p>
  
  <pre><code>Invalid arguments '
  Candidates are:
  void accept(boost::asio::basic_socket&lt;#10000,#10001&gt; &amp;, std::enable_if&lt;&amp;0[std::is_convertible&lt;boost::asio::ip::tcp,#10000&gt;::value],void&gt;::type *)
  boost::system::error_code accept(boost::asio::basic_socket&lt;#10000,#10001&gt; &amp;, boost::system::error_code &amp;, std::enable_if&lt;&amp;0[std::is_convertible&lt;boost::asio::ip::tcp,#10000&gt;::value],void&gt;::type *)
  void accept(boost::asio::basic_socket&lt;boost::asio::ip::tcp,#10000&gt; &amp;, boost::asio::ip::basic_endpoint&lt;boost::asio::ip::tcp&gt; &amp;)
  boost::system::error_code accept(boost::asio::basic_socket&lt;boost::asio::ip::tcp,#10000&gt; &amp;, boost::asio::ip::basic_endpoint&lt;boost::asio::ip::tcp&gt; &amp;, boost::system::error_code &amp;)
  '   boostTest.cpp   /boostTest  line 41 Semantic Error
  </code></pre>
  
  <p>and this is the code i am trying </p>
  
  <pre><code>#include &lt;ctime&gt;
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;boost/asio.hpp&gt;
  
  using boost::asio::ip::tcp;
  
  std::string make_daytime_string()
  {
     using namespace std; // For time_t, time and ctime;
     time_t now = time(0);
     return ctime(&amp;now);
  }
  
  int main()
  {
    try
    {
      boost::asio::io_service io_service;
  
      tcp::acceptor acceptor(io_service, tcp::endpoint(tcp::v4(), 13));
  
      for (;;)
      {
        tcp::socket socket(io_service);
        acceptor.accept(socket);
  
        std::string message = make_daytime_string();
  
        boost::system::error_code ignored_error;
        boost::asio::write(socket, boost::asio::buffer(message), ignored_error);
      }
    }
    catch (std::exception&amp; e)
    {
      std::cerr &lt;&lt; e.what() &lt;&lt; std::endl;
    }
  
    return 0;
  }
  </code></pre>