我得到的编译错误表达式不能在构造函数初始化时用作函数。
class server
{
public:
server(boost::asio::io_service& io_service, unsigned short port,ConnectionReceiver* r)
:acceptor_(io_service,tcp::endpoint(tcp::v4(), port),receiver(r))
{
start_accept();
}
private:
tcp::acceptor acceptor_;
ConnectionReceiver* receiver;
};