]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /* |
2 | * Copyright Andrey Semashev 2007 - 2013. | |
3 | * Distributed under the Boost Software License, Version 1.0. | |
4 | * (See accompanying file LICENSE_1_0.txt or copy at | |
5 | * http://www.boost.org/LICENSE_1_0.txt) | |
6 | */ | |
7 | ||
8 | /*! | |
9 | * \file empty_deleter.hpp | |
10 | * \author Andrey Semashev | |
11 | * \date 22.04.2007 | |
12 | * | |
13 | * This header contains an \c empty_deleter implementation. This is an empty | |
14 | * function object that receives a pointer and does nothing with it. | |
15 | * Such empty deletion strategy may be convenient, for example, when | |
16 | * constructing <tt>shared_ptr</tt>s that point to some object that should not be | |
17 | * deleted (i.e. a variable on the stack or some global singleton, like <tt>std::cout</tt>). | |
18 | */ | |
19 | ||
20 | #ifndef BOOST_UTILITY_EMPTY_DELETER_HPP | |
21 | #define BOOST_UTILITY_EMPTY_DELETER_HPP | |
22 | ||
23 | #include <boost/config.hpp> | |
24 | #include <boost/core/null_deleter.hpp> | |
25 | ||
26 | #ifdef BOOST_HAS_PRAGMA_ONCE | |
27 | #pragma once | |
28 | #endif | |
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 | ||
36 | namespace boost { | |
37 | ||
38 | //! A deprecated name for \c null_deleter | |
39 | typedef null_deleter empty_deleter; | |
40 | ||
41 | } // namespace boost | |
42 | ||
43 | #endif // BOOST_UTILITY_EMPTY_DELETER_HPP |