Move src/local_free_on_destruction.hpp to include/boost/detail. Was not being found by some VC++ versions, plus header only builds are supposed to be possible without non-header directories even being present.

This commit is contained in:
Beman committed 2014-01-06 15:37:51 -05:00
1 parent 199c0cfb0b
commit 42ee65f745
2 files changed
+1 -1

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@
# if defined( BOOST_WINDOWS_API )
# include <windows.h>
# if !defined(WINAPI_FAMILY) || ((WINAPI_FAMILY & WINAPI_PARTITION_DESKTOP) != 0)
# include "local_free_on_destruction.hpp"
# include <boost/system/detail/local_free_on_destruction.hpp>
# endif
# ifndef ERROR_INCORRECT_SIZE
# define ERROR_INCORRECT_SIZE ERROR_BAD_ARGUMENTS
@@ -0,0 +1,40 @@
// local_free_on_exit.hpp ------------------------------------------------------------//
// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2010 Beman Dawes
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// This is derived from boost/asio/detail/local_free_on_block_exit.hpp to avoid
// a dependency on asio. Thanks to Chris Kohlhoff for pointing it out.
#ifndef BOOST_SYSTEM_LOCAL_FREE_ON_EXIT_HPP
#define BOOST_SYSTEM_LOCAL_FREE_ON_EXIT_HPP
namespace boost {
namespace system {
namespace detail {
class local_free_on_destruction
{
public:
explicit local_free_on_destruction(void* p)
: p_(p) {}
~local_free_on_destruction()
{
::LocalFree(p_);
}
private:
void* p_;
local_free_on_destruction(const local_free_on_destruction&); // = deleted
local_free_on_destruction& operator=(const local_free_on_destruction&); // = deleted
};
} // namespace detail
} // namespace system
} // namespace boost
#endif // BOOST_SYSTEM_LOCAL_FREE_ON_EXIT_HPP