summaryrefslogtreecommitdiff
path: root/boost/utility/empty_deleter.hpp
diff options
context:
space:
mode:
authorChanho Park <chanho61.park@samsung.com>2014-12-11 18:55:56 +0900
committerChanho Park <chanho61.park@samsung.com>2014-12-11 18:55:56 +0900
commit08c1e93fa36a49f49325a07fe91ff92c964c2b6c (patch)
tree7a7053ceb8874b28ec4b868d4c49b500008a102e /boost/utility/empty_deleter.hpp
parentbb4dd8289b351fae6b55e303f189127a394a1edd (diff)
downloadboost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.tar.gz
boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.tar.bz2
boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.zip
Imported Upstream version 1.57.0upstream/1.57.0
Diffstat (limited to 'boost/utility/empty_deleter.hpp')
-rw-r--r--boost/utility/empty_deleter.hpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/boost/utility/empty_deleter.hpp b/boost/utility/empty_deleter.hpp
new file mode 100644
index 0000000000..91bc47b816
--- /dev/null
+++ b/boost/utility/empty_deleter.hpp
@@ -0,0 +1,43 @@
+/*
+ * Copyright Andrey Semashev 2007 - 2013.
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+/*!
+ * \file empty_deleter.hpp
+ * \author Andrey Semashev
+ * \date 22.04.2007
+ *
+ * This header contains an \c empty_deleter implementation. This is an empty
+ * function object that receives a pointer and does nothing with it.
+ * Such empty deletion strategy may be convenient, for example, when
+ * constructing <tt>shared_ptr</tt>s that point to some object that should not be
+ * deleted (i.e. a variable on the stack or some global singleton, like <tt>std::cout</tt>).
+ */
+
+#ifndef BOOST_UTILITY_EMPTY_DELETER_HPP
+#define BOOST_UTILITY_EMPTY_DELETER_HPP
+
+#include <boost/config.hpp>
+#include <boost/core/null_deleter.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+#pragma once
+#endif
+
+#if defined(__GNUC__)
+#pragma message "This header is deprecated, use boost/core/null_deleter.hpp instead."
+#elif defined(_MSC_VER)
+#pragma message("This header is deprecated, use boost/core/null_deleter.hpp instead.")
+#endif
+
+namespace boost {
+
+//! A deprecated name for \c null_deleter
+typedef null_deleter empty_deleter;
+
+} // namespace boost
+
+#endif // BOOST_UTILITY_EMPTY_DELETER_HPP