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 | |
9 | #ifndef BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED |
10 | #define BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED |
11 | |
12 | #include <boost/type_traits/intrinsics.hpp> |
13 | #include <boost/type_traits/integral_constant.hpp> |
14 | |
15 | #ifdef BOOST_HAS_TRIVIAL_DESTRUCTOR |
16 | |
17 | #if defined(BOOST_INTEL) || defined(BOOST_MSVC) |
18 | #include <boost/type_traits/is_pod.hpp> |
19 | #endif |
20 | #ifdef BOOST_HAS_SGI_TYPE_TRAITS |
21 | #include <boost/type_traits/is_same.hpp> |
22 | #endif |
23 | |
24 | #if defined(__GNUC__) || defined(__clang) || defined(__SUNPRO_CC) |
25 | #include <boost/type_traits/is_destructible.hpp> |
26 | #endif |
27 | |
28 | namespace boost { |
29 | |
30 | template <typename T> struct has_trivial_destructor : public integral_constant<bool, BOOST_HAS_TRIVIAL_DESTRUCTOR(T)>{}; |
31 | #else |
32 | #include <boost/type_traits/is_pod.hpp> |
33 | |
34 | namespace boost{ |
35 | |
36 | template <typename T> struct has_trivial_destructor : public integral_constant<bool, ::boost::is_pod<T>::value>{}; |
37 | #endif |
38 | |
39 | template <> struct has_trivial_destructor<void> : public false_type{}; |
40 | #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS |
41 | template <> struct has_trivial_destructor<void const> : public false_type{}; |
42 | template <> struct has_trivial_destructor<void const volatile> : public false_type{}; |
43 | template <> struct has_trivial_destructor<void volatile> : public false_type{}; |
44 | #endif |
45 | |
46 | } // namespace boost |
47 | |
48 | #endif // BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED |
49 |