diff options
Diffstat (limited to 'indra/llcommon/llpounceable.h')
| -rw-r--r-- | indra/llcommon/llpounceable.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/indra/llcommon/llpounceable.h b/indra/llcommon/llpounceable.h index 0421ce966a..20561b0c65 100644 --- a/indra/llcommon/llpounceable.h +++ b/indra/llcommon/llpounceable.h @@ -36,13 +36,13 @@ #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> -#include <boost/unordered_map.hpp> #include <boost/signals2/signal.hpp> +#include <unordered_map> +#include <type_traits> + // Forward declare the user template, since we want to be able to point to it // in some of its implementation classes. template <typename T, class TAG> @@ -86,7 +86,7 @@ class LLPounceableQueueSingleton: // instance will call on the SAME LLPounceableQueueSingleton instance -- // given how class statics work. We must keep a separate queue for each // LLPounceable instance. Use a hash map for that. - typedef boost::unordered_map<owner_ptr, signal_t> map_t; + typedef std::unordered_map<owner_ptr, signal_t> map_t; public: // Disambiguate queues belonging to different LLPounceables. @@ -139,7 +139,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: public boost::noncopyable +class LLPounceable { private: typedef LLPounceableTraits<T, TAG> traits; @@ -158,9 +158,13 @@ public: mEmpty(empty) {} + // Non-copyable + LLPounceable(const LLPounceable&) = delete; + LLPounceable& operator=(const LLPounceable&) = delete; + // make read access to mHeld as cheap and transparent as possible operator T () const { return mHeld; } - typename boost::remove_pointer<T>::type operator*() const { return *mHeld; } + typename std::remove_pointer<T>::type operator*() const { return *mHeld; } typename boost::call_traits<T>::value_type operator->() const { return mHeld; } // uncomment 'explicit' as soon as we allow C++11 compilation /*explicit*/ operator bool() const { return bool(mHeld); } |
