我有一个 boost socket 实现,它可以在 Windows 和 Linux 上完美运行,但在 mac 上,相同的代码会出现一堆编译错误,例如。
src/modules/socket/ssl_tcp_socket_binding.cpp: In constructor
'ti::SecureTCPSocket::SecureTCPSocket(tide::Host*, ti::TCPSocketBinding*)':
src/modules/socket/ssl_tcp_socket_binding.cpp:27: error: class 'ti::SecureTCPSocket' does not have any field named 'Socket'
src/modules/socket/ssl_tcp_socket_binding.cpp:29: error: no matching function for call to 'ti::Socket<boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >&> >::Socket()'
构造函数
SecureTCPSocket::SecureTCPSocket(Host *host, TCPSocketBinding * tcp_socket_binding)
: Socket(host, string("Socket.SecureTCPSocket")),
标题
class SecureTCPSocket
: public Socket<boost::asio::ssl::stream<tcp::socket&> >
{
我不明白为什么这在 Mac 上是个问题,但在 Linux 和 Windows 上却完全没问题?
关于我可能做错或遗漏的任何想法?