Mercurial > hg > vamp-build-and-test
annotate DEPENDENCIES/generic/include/boost/align/aligned_delete.hpp @ 133:4acb5d8d80b6 tip
Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author | Chris Cannam |
---|---|
date | Tue, 30 Jul 2019 12:25:44 +0100 |
parents | f46d142149f5 |
children |
rev | line source |
---|---|
Chris@102 | 1 /* |
Chris@102 | 2 (c) 2014 Glen Joseph Fernandes |
Chris@102 | 3 glenjofe at gmail dot com |
Chris@102 | 4 |
Chris@102 | 5 Distributed under the Boost Software |
Chris@102 | 6 License, Version 1.0. |
Chris@102 | 7 http://boost.org/LICENSE_1_0.txt |
Chris@102 | 8 */ |
Chris@102 | 9 #ifndef BOOST_ALIGN_ALIGNED_DELETE_HPP |
Chris@102 | 10 #define BOOST_ALIGN_ALIGNED_DELETE_HPP |
Chris@102 | 11 |
Chris@102 | 12 #include <boost/config.hpp> |
Chris@102 | 13 #include <boost/align/aligned_alloc.hpp> |
Chris@102 | 14 #include <boost/align/aligned_delete_forward.hpp> |
Chris@102 | 15 |
Chris@102 | 16 namespace boost { |
Chris@102 | 17 namespace alignment { |
Chris@102 | 18 class aligned_delete { |
Chris@102 | 19 public: |
Chris@102 | 20 template<class T> |
Chris@102 | 21 void operator()(T* ptr) const |
Chris@102 | 22 BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(ptr->~T())) { |
Chris@102 | 23 if (ptr) { |
Chris@102 | 24 ptr->~T(); |
Chris@102 | 25 alignment::aligned_free(ptr); |
Chris@102 | 26 } |
Chris@102 | 27 } |
Chris@102 | 28 }; |
Chris@102 | 29 } |
Chris@102 | 30 } |
Chris@102 | 31 |
Chris@102 | 32 #endif |