Initialize reference member with default value
Posted on 2008-10-29
Hi This is what I want do in my class ProtocolInfo:
I have two contructors :
when my client calls ProtocolInfo, internally I creates a new ProtocolInfo object and assign to its internal member variable :
boost::asio::io_service& m_pIo_service; a value which can only be passed in initialization list.
My question is how to creates the original ProtocolInfo with default value since a reference member cannot be initialized with NULL reference in c++?