comparison DEPENDENCIES/generic/include/boost/utility/empty_deleter.hpp @ 101:c530137014c0

Update Boost headers (1.58.0)
author Chris Cannam
date Mon, 07 Sep 2015 11:12:49 +0100
parents 2665513ce2d3
children
comparison
equal deleted inserted replaced
100:793467b5e61c 101:c530137014c0
2 * Copyright Andrey Semashev 2007 - 2013. 2 * Copyright Andrey Semashev 2007 - 2013.
3 * Distributed under the Boost Software License, Version 1.0. 3 * Distributed under the Boost Software License, Version 1.0.
4 * (See accompanying file LICENSE_1_0.txt or copy at 4 * (See accompanying file LICENSE_1_0.txt or copy at
5 * http://www.boost.org/LICENSE_1_0.txt) 5 * http://www.boost.org/LICENSE_1_0.txt)
6 */ 6 */
7
7 /*! 8 /*!
8 * \file empty_deleter.hpp 9 * \file empty_deleter.hpp
9 * \author Andrey Semashev 10 * \author Andrey Semashev
10 * \date 22.04.2007 11 * \date 22.04.2007
11 * 12 *
14 * Such empty deletion strategy may be convenient, for example, when 15 * Such empty deletion strategy may be convenient, for example, when
15 * constructing <tt>shared_ptr</tt>s that point to some object that should not be 16 * constructing <tt>shared_ptr</tt>s that point to some object that should not be
16 * deleted (i.e. a variable on the stack or some global singleton, like <tt>std::cout</tt>). 17 * deleted (i.e. a variable on the stack or some global singleton, like <tt>std::cout</tt>).
17 */ 18 */
18 19
19 #ifndef BOOST_UTILITY_EMPTY_DELETER_HPP_INCLUDED_ 20 #ifndef BOOST_UTILITY_EMPTY_DELETER_HPP
20 #define BOOST_UTILITY_EMPTY_DELETER_HPP_INCLUDED_ 21 #define BOOST_UTILITY_EMPTY_DELETER_HPP
21 22
22 #include <boost/config.hpp> 23 #include <boost/config.hpp>
24 #include <boost/core/null_deleter.hpp>
23 25
24 #ifdef BOOST_HAS_PRAGMA_ONCE 26 #ifdef BOOST_HAS_PRAGMA_ONCE
25 #pragma once 27 #pragma once
26 #endif 28 #endif
27 29
30 #if defined(__GNUC__)
31 #pragma message "This header is deprecated, use boost/core/null_deleter.hpp instead."
32 #elif defined(_MSC_VER)
33 #pragma message("This header is deprecated, use boost/core/null_deleter.hpp instead.")
34 #endif
35
28 namespace boost { 36 namespace boost {
29 37
30 //! A function object that does nothing and can be used as an empty deleter for \c shared_ptr 38 //! A deprecated name for \c null_deleter
31 struct empty_deleter 39 typedef null_deleter empty_deleter;
32 {
33 //! Function object result type
34 typedef void result_type;
35 /*!
36 * Does nothing
37 */
38 void operator() (const volatile void*) const BOOST_NOEXCEPT {}
39 };
40 40
41 } // namespace boost 41 } // namespace boost
42 42
43 #endif // BOOST_UTILITY_EMPTY_DELETER_HPP_INCLUDED_ 43 #endif // BOOST_UTILITY_EMPTY_DELETER_HPP