Chris@102: /* Chris@102: (c) 2014 Glen Joseph Fernandes Chris@102: glenjofe at gmail dot com Chris@102: Chris@102: Distributed under the Boost Software Chris@102: License, Version 1.0. Chris@102: http://boost.org/LICENSE_1_0.txt Chris@102: */ Chris@102: #ifndef BOOST_ALIGN_ALIGNED_DELETE_HPP Chris@102: #define BOOST_ALIGN_ALIGNED_DELETE_HPP Chris@102: Chris@102: #include Chris@102: #include Chris@102: #include Chris@102: Chris@102: namespace boost { Chris@102: namespace alignment { Chris@102: class aligned_delete { Chris@102: public: Chris@102: template Chris@102: void operator()(T* ptr) const Chris@102: BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(ptr->~T())) { Chris@102: if (ptr) { Chris@102: ptr->~T(); Chris@102: alignment::aligned_free(ptr); Chris@102: } Chris@102: } Chris@102: }; Chris@102: } Chris@102: } Chris@102: Chris@102: #endif