Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:42:51

0001 /*
0002 Copyright 2014-2015 Glen Joseph Fernandes
0003 (glenjofe@gmail.com)
0004 
0005 Distributed under the Boost Software License, Version 1.0.
0006 (http://www.boost.org/LICENSE_1_0.txt)
0007 */
0008 #ifndef BOOST_ALIGN_ALIGNED_DELETE_HPP
0009 #define BOOST_ALIGN_ALIGNED_DELETE_HPP
0010 
0011 #include <boost/align/aligned_alloc.hpp>
0012 #include <boost/align/aligned_delete_forward.hpp>
0013 
0014 namespace boost {
0015 namespace alignment {
0016 
0017 struct aligned_delete {
0018     template<class T>
0019     void operator()(T* ptr) const
0020         BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(ptr->~T())) {
0021         if (ptr) {
0022             ptr->~T();
0023             boost::alignment::aligned_free(ptr);
0024         }
0025     }
0026 };
0027 
0028 } /* alignment */
0029 } /* boost */
0030 
0031 #endif