Warning, file /include/boost/intrusive/detail/exception_disposer.hpp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef BOOST_INTRUSIVE_DETAIL_EXCEPTION_DISPOSER_HPP
0014 #define BOOST_INTRUSIVE_DETAIL_EXCEPTION_DISPOSER_HPP
0015
0016 #ifndef BOOST_CONFIG_HPP
0017 # include <boost/config.hpp>
0018 #endif
0019
0020 #if defined(BOOST_HAS_PRAGMA_ONCE)
0021 # pragma once
0022 #endif
0023
0024 #include <boost/intrusive/detail/workaround.hpp>
0025
0026 namespace boost {
0027 namespace intrusive {
0028 namespace detail {
0029
0030 template<class Container, class Disposer>
0031 class exception_disposer
0032 {
0033 Container *cont_;
0034 Disposer &disp_;
0035
0036 exception_disposer(const exception_disposer&);
0037 exception_disposer &operator=(const exception_disposer&);
0038
0039 public:
0040 exception_disposer(Container &cont, Disposer &disp)
0041 : cont_(&cont), disp_(disp)
0042 {}
0043
0044 inline void release()
0045 { cont_ = 0; }
0046
0047 ~exception_disposer()
0048 {
0049 if(cont_){
0050 cont_->clear_and_dispose(disp_);
0051 }
0052 }
0053 };
0054
0055 }
0056 }
0057 }
0058
0059 #endif