comparison DEPENDENCIES/generic/include/boost/align/aligned_delete.hpp @ 102:f46d142149f5

Whoops, finish that update
author Chris Cannam
date Mon, 07 Sep 2015 11:13:41 +0100
parents
children
comparison
equal deleted inserted replaced
101:c530137014c0 102:f46d142149f5
1 /*
2 (c) 2014 Glen Joseph Fernandes
3 glenjofe at gmail dot 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/config.hpp>
13 #include <boost/align/aligned_alloc.hpp>
14 #include <boost/align/aligned_delete_forward.hpp>
15
16 namespace boost {
17 namespace alignment {
18 class aligned_delete {
19 public:
20 template<class T>
21 void operator()(T* ptr) const
22 BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(ptr->~T())) {
23 if (ptr) {
24 ptr->~T();
25 alignment::aligned_free(ptr);
26 }
27 }
28 };
29 }
30 }
31
32 #endif