]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/align/include/boost/align/aligned_delete.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / align / include / boost / align / aligned_delete.hpp
1 /*
2 (c) 2014-2015 Glen Joseph Fernandes
3 <glenjofe -at- gmail.com>
4
5 Distributed under the Boost Software
6 License, Version 1.0.
7 http://boost.org/LICENSE_1_0.txt
8 */
9 #ifndef BOOST_ALIGN_ALIGNED_DELETE_HPP
10 #define BOOST_ALIGN_ALIGNED_DELETE_HPP
11
12 #include <boost/align/aligned_alloc.hpp>
13 #include <boost/align/aligned_delete_forward.hpp>
14
15 namespace boost {
16 namespace alignment {
17
18 struct aligned_delete {
19 template<class T>
20 void operator()(T* ptr) const
21 BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(ptr->~T())) {
22 if (ptr) {
23 ptr->~T();
24 boost::alignment::aligned_free(ptr);
25 }
26 }
27 };
28
29 } /* .alignment */
30 } /* .boost */
31
32 #endif