Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77684 - trunk/boost/thread/detail
From: vicente.botet_at_[hidden]
Date: 2012-04-01 05:14:54


Author: viboes
Date: 2012-04-01 05:14:50 EDT (Sun, 01 Apr 2012)
New Revision: 77684
URL: http://svn.boost.org/trac/boost/changeset/77684

Log:
Thread: Added missing file
Added:
   trunk/boost/thread/detail/memory.hpp (contents, props changed)

Added: trunk/boost/thread/detail/memory.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/thread/detail/memory.hpp 2012-04-01 05:14:50 EDT (Sun, 01 Apr 2012)
@@ -0,0 +1,54 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Pablo Halpern 2009. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2011-2012. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_THREAD_DETAIL_MEMORY_HPP
+#define BOOST_THREAD_DETAIL_MEMORY_HPP
+
+
+#include <boost/container/allocator_traits.hpp>
+#include <boost/container/scoped_allocator.hpp>
+
+namespace boost {
+
+namespace thread_detail {
+
+template <class _Alloc>
+class allocator_destructor
+{
+ typedef container::allocator_traits<_Alloc> alloc_traits;
+public:
+ typedef typename alloc_traits::pointer pointer;
+ typedef typename alloc_traits::size_type size_type;
+private:
+ _Alloc& alloc_;
+ size_type s_;
+public:
+ allocator_destructor(_Alloc& a, size_type s) BOOST_NOEXCEPT
+ : alloc_(a), s_(s)
+ {}
+ void operator()(pointer p) BOOST_NOEXCEPT
+ {
+ alloc_traits::deallocate(alloc_, p, s_);
+ }
+};
+
+
+} //namespace thread_detail {
+
+} // namespace boost
+
+
+#endif // BOOST_THREAD_DETAIL_MEMORY_HPP


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk