ManageAPR should be noncopyable. Make that explicit.
Any RAII class should either be noncopyable or should deal appropriately with a copy operation. ManageAPR is intended only for extremely simple cases, and hence should be noncopyable.meow-7.2.2
parent
f65028e38e
commit
d99acd56cd
|
|
@ -13,6 +13,7 @@
|
|||
#define LL_MANAGEAPR_H
|
||||
|
||||
#include "llapr.h"
|
||||
#include <boost/noncopyable.hpp>
|
||||
|
||||
/**
|
||||
* Declare a static instance of this class for dead-simple ll_init_apr() at
|
||||
|
|
@ -21,7 +22,7 @@
|
|||
* instances of other classes that depend on APR already being initialized,
|
||||
* the indeterminate static-constructor-order problem rears its ugly head.
|
||||
*/
|
||||
class ManageAPR
|
||||
class ManageAPR: public boost::noncopyable
|
||||
{
|
||||
public:
|
||||
ManageAPR()
|
||||
|
|
|
|||
Loading…
Reference in New Issue