1 ///////////////////////////////////////////////////////////////////////////// 2 // 3 // (C) Copyright Ion Gaztanaga 2014-2014 4 // 5 // Distributed under the Boost Software License, Version 1.0. 6 // (See accompanying file LICENSE_1_0.txt or copy at 7 // http://www.boost.org/LICENSE_1_0.txt) 8 // 9 // See http://www.boost.org/libs/intrusive for documentation. 10 // 11 ///////////////////////////////////////////////////////////////////////////// 12 13 #ifndef BOOST_INTRUSIVE_DETAIL_SIMPLE_DISPOSERS_HPP 14 #define BOOST_INTRUSIVE_DETAIL_SIMPLE_DISPOSERS_HPP 15 16 #include <boost/intrusive/detail/workaround.hpp> 17 18 #ifndef BOOST_CONFIG_HPP 19 # include <boost/config.hpp> 20 #endif 21 22 #if defined(BOOST_HAS_PRAGMA_ONCE) 23 # pragma once 24 #endif 25 26 namespace boost { 27 namespace intrusive { 28 namespace detail { 29 30 class null_disposer 31 { 32 public: 33 template <class Pointer> operator ()(Pointer)34 void operator()(Pointer) 35 {} 36 }; 37 38 template<class NodeAlgorithms> 39 class init_disposer 40 { 41 typedef typename NodeAlgorithms::node_ptr node_ptr; 42 43 public: operator ()(const node_ptr & p)44 BOOST_INTRUSIVE_FORCEINLINE void operator()(const node_ptr & p) 45 { NodeAlgorithms::init(p); } 46 }; 47 48 } //namespace detail{ 49 } //namespace intrusive{ 50 } //namespace boost{ 51 52 #endif //BOOST_INTRUSIVE_DETAIL_SIMPLE_DISPOSERS_HPP 53