]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/pool/test/test_bug_5526.cpp
1 /* Copyright (C) 2011 John Maddock
3 * Use, modification and distribution is subject to the
4 * Boost Software License, Version 1.0. (See accompanying
5 * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
8 // Test of bug #5526 (https://svn.boost.org/trac/boost/ticket/5526)
10 #include <boost/smart_ptr/scoped_ptr.hpp>
11 #include <boost/pool/pool.hpp>
12 #include <boost/pool/singleton_pool.hpp>
13 #include <boost/assert.hpp>
19 buf
= static_cast<int*>(boost::singleton_pool
<int, sizeof(int)>::malloc());
24 BOOST_ASSERT(*buf
== 0x1234);
25 boost::singleton_pool
<int, sizeof(int)>::free(buf
);
30 boost::scoped_ptr
<bad
> aptr
;
34 aptr
.reset(new bad());