编译Boost.Asio示例代码时出错

时间:2015-10-09 07:54:08

标签: c++ boost boost-asio

我尝试使用提供的白天示例here来处理提升asio。但是当我尝试编译它时,我收到了这个错误:

 void start_accept()
  {
    tcp_connection::pointer new_connection =
      tcp_connection::create(acceptor_.io_service());

以下是相关的代码部分:

> bold_statement_string  <- "narcos,is,maybe,better,than,the,wire"
[1] "narcos,is,maybe,better,than,the,wire"
> bold_statement_array  <- strsplit(bold_statement_string, ',')[[1]]
[1] "narcos" "is"     "maybe"  "better" "than"   "the"    "wire"  
> cat(paste(shQuote(bold_statement_array), collapse = ','))
'narcos','is','maybe','better','than','the','wire'

1 个答案:

答案 0 :(得分:3)

在链接的源代码中,行如下所示:

tcp_connection::create(acceptor_.get_io_service());

您应该将您对副本所做的更改还原。