Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 1 | |
| 2 | // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. |
| 3 | // Use, modification and distribution are subject to the Boost Software License, |
| 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at |
| 5 | // http://www.boost.org/LICENSE_1_0.txt). |
| 6 | // |
| 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. |
| 8 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 9 | #ifndef NDNBOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED |
| 10 | #define NDNBOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 11 | |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame] | 12 | #include <ndnboost/type_traits/config.hpp> |
| 13 | #include <ndnboost/type_traits/intrinsics.hpp> |
| 14 | #include <ndnboost/type_traits/is_pod.hpp> |
| 15 | #include <ndnboost/type_traits/detail/ice_or.hpp> |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 16 | |
| 17 | // should be the last #include |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame] | 18 | #include <ndnboost/type_traits/detail/bool_trait_def.hpp> |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 19 | |
| 20 | namespace ndnboost { |
| 21 | |
| 22 | namespace detail { |
| 23 | |
| 24 | template <typename T> |
| 25 | struct has_trivial_dtor_impl |
| 26 | { |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 27 | #ifdef NDNBOOST_HAS_TRIVIAL_DESTRUCTOR |
| 28 | NDNBOOST_STATIC_CONSTANT(bool, value = NDNBOOST_HAS_TRIVIAL_DESTRUCTOR(T)); |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 29 | #else |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 30 | NDNBOOST_STATIC_CONSTANT(bool, value = ::ndnboost::is_pod<T>::value); |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 31 | #endif |
| 32 | }; |
| 33 | |
| 34 | } // namespace detail |
| 35 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 36 | NDNBOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_destructor,T,::ndnboost::detail::has_trivial_dtor_impl<T>::value) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 37 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 38 | NDNBOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_destructor,void,false) |
| 39 | #ifndef NDNBOOST_NO_CV_VOID_SPECIALIZATIONS |
| 40 | NDNBOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_destructor,void const,false) |
| 41 | NDNBOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_destructor,void const volatile,false) |
| 42 | NDNBOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_destructor,void volatile,false) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 43 | #endif |
| 44 | |
| 45 | } // namespace ndnboost |
| 46 | |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame] | 47 | #include <ndnboost/type_traits/detail/bool_trait_undef.hpp> |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 48 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 49 | #endif // NDNBOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED |