Mercurial > hg > vamp-build-and-test
annotate DEPENDENCIES/generic/include/boost/core/null_deleter.hpp @ 125:34e428693f5d vext
Vext -> Repoint
author | Chris Cannam |
---|---|
date | Thu, 14 Jun 2018 11:15:39 +0100 |
parents | f46d142149f5 |
children |
rev | line source |
---|---|
Chris@102 | 1 /* |
Chris@102 | 2 * Copyright Andrey Semashev 2007 - 2014. |
Chris@102 | 3 * Distributed under the Boost Software License, Version 1.0. |
Chris@102 | 4 * (See accompanying file LICENSE_1_0.txt or copy at |
Chris@102 | 5 * http://www.boost.org/LICENSE_1_0.txt) |
Chris@102 | 6 */ |
Chris@102 | 7 /*! |
Chris@102 | 8 * \file null_deleter.hpp |
Chris@102 | 9 * \author Andrey Semashev |
Chris@102 | 10 * \date 22.04.2007 |
Chris@102 | 11 * |
Chris@102 | 12 * This header contains a \c null_deleter implementation. This is an empty |
Chris@102 | 13 * function object that receives a pointer and does nothing with it. |
Chris@102 | 14 * Such empty deletion strategy may be convenient, for example, when |
Chris@102 | 15 * constructing <tt>shared_ptr</tt>s that point to some object that should not be |
Chris@102 | 16 * deleted (i.e. a variable on the stack or some global singleton, like <tt>std::cout</tt>). |
Chris@102 | 17 */ |
Chris@102 | 18 |
Chris@102 | 19 #ifndef BOOST_CORE_NULL_DELETER_HPP |
Chris@102 | 20 #define BOOST_CORE_NULL_DELETER_HPP |
Chris@102 | 21 |
Chris@102 | 22 #include <boost/config.hpp> |
Chris@102 | 23 |
Chris@102 | 24 #ifdef BOOST_HAS_PRAGMA_ONCE |
Chris@102 | 25 #pragma once |
Chris@102 | 26 #endif |
Chris@102 | 27 |
Chris@102 | 28 namespace boost { |
Chris@102 | 29 |
Chris@102 | 30 //! A function object that does nothing and can be used as an empty deleter for \c shared_ptr |
Chris@102 | 31 struct null_deleter |
Chris@102 | 32 { |
Chris@102 | 33 //! Function object result type |
Chris@102 | 34 typedef void result_type; |
Chris@102 | 35 /*! |
Chris@102 | 36 * Does nothing |
Chris@102 | 37 */ |
Chris@102 | 38 template< typename T > |
Chris@102 | 39 void operator() (T*) const BOOST_NOEXCEPT {} |
Chris@102 | 40 }; |
Chris@102 | 41 |
Chris@102 | 42 } // namespace boost |
Chris@102 | 43 |
Chris@102 | 44 #endif // BOOST_CORE_NULL_DELETER_HPP |