forked from boostorg/type_traits
Improve is_destructible and add tests.
This commit is contained in:
1 parent
2d71379074
commit
434e26e7a3
2 files changed
+184
No files matched your search
@@ -32,6 +32,8 @@ namespace boost{
|
||||
}
|
||||
|
||||
template <class T> struct is_destructible : public integral_constant<bool, sizeof(detail::is_destructible_imp::test<T>(0)) == sizeof(boost::type_traits::yes_type)>{};
|
||||
template <class T, std::size_t N> struct is_destructible<T[N]> : public is_destructible<T>{};
|
||||
template <class T> struct is_destructible<T[]> : public is_destructible<T>{};
|
||||
|
||||
#else
|
||||
|
||||
@@ -44,6 +46,11 @@ namespace boost{
|
||||
template <class T> struct is_destructible : public integral_constant<bool, is_pod<T>::value || is_class<T>::value>{};
|
||||
#endif
|
||||
|
||||
template <> struct is_destructible<void> : public false_type{};
|
||||
template <> struct is_destructible<void const> : public false_type{};
|
||||
template <> struct is_destructible<void volatile> : public false_type{};
|
||||
template <> struct is_destructible<void const volatile> : public false_type{};
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_TT_IS_DESTRUCTIBLE_HPP_INCLUDED
|
||||
Reference in new issue
Block a user