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