annotate DEPENDENCIES/generic/include/boost/system/detail/local_free_on_destruction.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 // local_free_on_exit.hpp ------------------------------------------------------------//
Chris@102 2
Chris@102 3 // Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com)
Chris@102 4 // Copyright (c) 2010 Beman Dawes
Chris@102 5
Chris@102 6 // Distributed under the Boost Software License, Version 1.0.
Chris@102 7 // See http://www.boost.org/LICENSE_1_0.txt
Chris@102 8
Chris@102 9 // This is derived from boost/asio/detail/local_free_on_block_exit.hpp to avoid
Chris@102 10 // a dependency on asio. Thanks to Chris Kohlhoff for pointing it out.
Chris@102 11
Chris@102 12 #ifndef BOOST_SYSTEM_LOCAL_FREE_ON_EXIT_HPP
Chris@102 13 #define BOOST_SYSTEM_LOCAL_FREE_ON_EXIT_HPP
Chris@102 14
Chris@102 15 namespace boost {
Chris@102 16 namespace system {
Chris@102 17 namespace detail {
Chris@102 18
Chris@102 19 class local_free_on_destruction
Chris@102 20 {
Chris@102 21 public:
Chris@102 22 explicit local_free_on_destruction(void* p)
Chris@102 23 : p_(p) {}
Chris@102 24
Chris@102 25 ~local_free_on_destruction()
Chris@102 26 {
Chris@102 27 ::LocalFree(p_);
Chris@102 28 }
Chris@102 29
Chris@102 30 private:
Chris@102 31 void* p_;
Chris@102 32 local_free_on_destruction(const local_free_on_destruction&); // = deleted
Chris@102 33 local_free_on_destruction& operator=(const local_free_on_destruction&); // = deleted
Chris@102 34 };
Chris@102 35
Chris@102 36 } // namespace detail
Chris@102 37 } // namespace system
Chris@102 38 } // namespace boost
Chris@102 39
Chris@102 40 #endif // BOOST_SYSTEM_LOCAL_FREE_ON_EXIT_HPP