
3 Apr
2014
3 Apr
'14
1:25 p.m.
This is how you pass Packet instance (as a temporary, i.e. rvalue):
handler(Packet(m_headerInBuffer.getShort(4), bytes_transferred, m_currReadBuffer));
And this is the signature of the function that expects Packet &, i.e. lvalue:
void testPacket(Packet& packet) {}
It seems that they do not match.