我有以下代碼: if ((m_mainSocket = ::socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0)
{
throw Exception(__FILE__, __LINE__) << "Unable to create socket";
}
int on(0);
if (setsockopt(m_mainSocket, S
以下example from boost bind不爲我工作: #include <boost/bind.hpp>
struct A
{
int data;
};
int main()
{
A a;
boost::bind(&A::data, _1)(a) = 1;
}
error: assignment of read-only location