MAINT-5232: Make LLPounceable noncopyable.
Changing the queue-of-callables implementation to boost::signals2::signal, which is noncopyable, means that LLPounceable itself should be noncopyable.meow-7.2.2
parent
a9650ba222
commit
ccc55255c5
|
|
@ -36,6 +36,7 @@
|
|||
#define LL_LLPOUNCEABLE_H
|
||||
|
||||
#include "llsingleton.h"
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/call_traits.hpp>
|
||||
#include <boost/type_traits/remove_pointer.hpp>
|
||||
#include <boost/utility/value_init.hpp>
|
||||
|
|
@ -137,7 +138,7 @@ private:
|
|||
// LLPounceable<T> is for an LLPounceable instance on the heap or the stack.
|
||||
// LLPounceable<T, LLPounceableStatic> is for a static LLPounceable instance.
|
||||
template <typename T, class TAG=LLPounceableQueue>
|
||||
class LLPounceable
|
||||
class LLPounceable: public boost::noncopyable
|
||||
{
|
||||
private:
|
||||
typedef LLPounceableTraits<T, TAG> traits;
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ namespace tut
|
|||
Data a("a");
|
||||
// should be able to initialize a pounceable (when its constructor
|
||||
// runs)
|
||||
LLPounceable<Data*> pounceable = &a;
|
||||
LLPounceable<Data*> pounceable(&a);
|
||||
// should be able to pass LLPounceable<T> to function accepting T
|
||||
setter(&aptr, pounceable);
|
||||
ensure_equals("aptr should be &a", aptr, &a);
|
||||
|
|
|
|||
Loading…
Reference in New Issue