Hi dear all.
I have a class named "session" look like below code:
class session : public boost::enable_shared_from_this< session >,
private boost::noncopyable
{
public:
session(boost::asio::io_service& io_service);
.....
};
I want use boost::object_pool for allocate memory for session.
class host
{
public:
typedef boost::object_pool<session> session_pool;
host()
: new_session_( session_pool_.construct(),
boost::bind(&session_pool::destroy, &session_pool_))
{
}
public:
boost::shared_ptr< session > new_session_;
session_pool session_pool_;
};
but there has a compiler error was occured:
1> d:\development\boost_1_35_0\boost\bind.hpp(1613) : warning C4180:
qualifier applied to function type has no meaning; ignored
1> d:\development\boost_1_35_0\boost\bind.hpp(1647) : see reference
to class template instantiation 'boost::_bi::add_cref