From 8a40e1474f5aa6884de2895a319d9c919729341f Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sun, 27 Oct 2002 11:30:07 +0000 Subject: [PATCH] Changed is_POD.hpp to is_pod.hpp (first try!). [SVN r15993] --- .../boost/type_traits/has_trivial_assign.hpp | 2 +- .../type_traits/has_trivial_constructor.hpp | 2 +- .../boost/type_traits/has_trivial_copy.hpp | 2 +- .../type_traits/has_trivial_destructor.hpp | 2 +- include/boost/type_traits/is_pod.hpp | 132 ------------------ include/boost/type_traits/object_traits.hpp | 2 +- .../boost/type_traits/type_with_alignment.hpp | 2 +- 7 files changed, 6 insertions(+), 138 deletions(-) delete mode 100644 include/boost/type_traits/is_pod.hpp diff --git a/include/boost/type_traits/has_trivial_assign.hpp b/include/boost/type_traits/has_trivial_assign.hpp index 7da4560..a6afb52 100644 --- a/include/boost/type_traits/has_trivial_assign.hpp +++ b/include/boost/type_traits/has_trivial_assign.hpp @@ -10,7 +10,7 @@ #ifndef BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED #define BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED -#include "boost/type_traits/is_POD.hpp" +#include "boost/type_traits/is_pod.hpp" #include "boost/type_traits/is_const.hpp" #include "boost/type_traits/is_volatile.hpp" #include "boost/type_traits/detail/ice_and.hpp" diff --git a/include/boost/type_traits/has_trivial_constructor.hpp b/include/boost/type_traits/has_trivial_constructor.hpp index 38cd8e2..4dabab4 100644 --- a/include/boost/type_traits/has_trivial_constructor.hpp +++ b/include/boost/type_traits/has_trivial_constructor.hpp @@ -10,7 +10,7 @@ #ifndef BOOST_TT_HAS_TRIVIAL_CONSTRUCTOR_HPP_INCLUDED #define BOOST_TT_HAS_TRIVIAL_CONSTRUCTOR_HPP_INCLUDED -#include "boost/type_traits/is_POD.hpp" +#include "boost/type_traits/is_pod.hpp" #include "boost/type_traits/detail/ice_or.hpp" #include "boost/type_traits/config.hpp" diff --git a/include/boost/type_traits/has_trivial_copy.hpp b/include/boost/type_traits/has_trivial_copy.hpp index 5d31cf5..9bc8421 100644 --- a/include/boost/type_traits/has_trivial_copy.hpp +++ b/include/boost/type_traits/has_trivial_copy.hpp @@ -11,7 +11,7 @@ #define BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED #include "boost/type_traits/is_volatile.hpp" -#include "boost/type_traits/is_POD.hpp" +#include "boost/type_traits/is_pod.hpp" #include "boost/type_traits/detail/ice_and.hpp" #include "boost/type_traits/detail/ice_or.hpp" #include "boost/type_traits/detail/ice_not.hpp" diff --git a/include/boost/type_traits/has_trivial_destructor.hpp b/include/boost/type_traits/has_trivial_destructor.hpp index 2314271..b0f9d16 100644 --- a/include/boost/type_traits/has_trivial_destructor.hpp +++ b/include/boost/type_traits/has_trivial_destructor.hpp @@ -10,7 +10,7 @@ #ifndef BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED #define BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED -#include "boost/type_traits/is_POD.hpp" +#include "boost/type_traits/is_pod.hpp" #include "boost/type_traits/detail/ice_or.hpp" #include "boost/type_traits/config.hpp" diff --git a/include/boost/type_traits/is_pod.hpp b/include/boost/type_traits/is_pod.hpp deleted file mode 100644 index 700d1e4..0000000 --- a/include/boost/type_traits/is_pod.hpp +++ /dev/null @@ -1,132 +0,0 @@ - -// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. -// Permission to copy, use, modify, sell and distribute this software is -// granted provided this copyright notice appears in all copies. This software -// is provided "as is" without express or implied warranty, and with no claim -// as to its suitability for any purpose. -// -// See http://www.boost.org for most recent version including documentation. - -#ifndef BOOST_TT_IS_POD_HPP_INCLUDED -#define BOOST_TT_IS_POD_HPP_INCLUDED - -#include "boost/type_traits/is_void.hpp" -#include "boost/type_traits/is_scalar.hpp" -#include "boost/type_traits/detail/ice_or.hpp" -#include "boost/type_traits/config.hpp" - -#include - -// should be the last #include -#include "boost/type_traits/detail/bool_trait_def.hpp" - -namespace boost { - -// forward declaration, needed by 'is_POD_array_helper' template below -template< typename T > struct is_POD; - -namespace detail { - -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -template struct is_POD_impl -{ - BOOST_STATIC_CONSTANT( - bool, value = - (::boost::type_traits::ice_or< - ::boost::is_scalar::value, - ::boost::is_void::value, - BOOST_IS_POD(T) - >::value)); -}; - -template -struct is_POD_impl - : is_POD_impl -{ -}; - -#else - -template -struct is_POD_helper -{ - template struct result_ - { - BOOST_STATIC_CONSTANT( - bool, value = - (::boost::type_traits::ice_or< - ::boost::is_scalar::value, - ::boost::is_void::value, - BOOST_IS_POD(T) - >::value)); - }; -}; - -template -struct bool_to_yes_no_type -{ - typedef ::boost::type_traits::no_type type; -}; - -template <> -struct bool_to_yes_no_type -{ - typedef ::boost::type_traits::yes_type type; -}; - -template -struct is_POD_array_helper -{ - enum { is_pod = ::boost::is_POD::value }; // MSVC workaround - typedef typename bool_to_yes_no_type::type type; - type instance() const; -}; - -template -is_POD_array_helper is_POD_array(T*); - -template <> -struct is_POD_helper -{ - template struct result_ - { - static T& help(); - BOOST_STATIC_CONSTANT(bool, value = - sizeof(is_POD_array(help()).instance()) == sizeof(::boost::type_traits::yes_type) - ); - }; -}; - - -template struct is_POD_impl -{ - BOOST_STATIC_CONSTANT( - bool, value = ( - ::boost::detail::is_POD_helper< - ::boost::is_array::value - >::template result_::value - ) - ); -}; - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -} // namespace detail - -BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_POD,T,::boost::detail::is_POD_impl::value) - -// the following help compilers without partial specialization support: -BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_POD,void,true) - -#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS -BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_POD,void const,true) -BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_POD,void volatile,true) -BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_POD,void const volatile,true) -#endif - -} // namespace boost - -#include "boost/type_traits/detail/bool_trait_undef.hpp" - -#endif // BOOST_TT_IS_POD_HPP_INCLUDED diff --git a/include/boost/type_traits/object_traits.hpp b/include/boost/type_traits/object_traits.hpp index f9c963a..f604aa1 100644 --- a/include/boost/type_traits/object_traits.hpp +++ b/include/boost/type_traits/object_traits.hpp @@ -27,7 +27,7 @@ #include "boost/type_traits/is_compound.hpp" #include "boost/type_traits/is_empty.hpp" #include "boost/type_traits/is_object.hpp" -#include "boost/type_traits/is_POD.hpp" +#include "boost/type_traits/is_pod.hpp" #include "boost/type_traits/is_scalar.hpp" #include "boost/type_traits/is_stateless.hpp" diff --git a/include/boost/type_traits/type_with_alignment.hpp b/include/boost/type_traits/type_with_alignment.hpp index 8d095b4..dfc6313 100644 --- a/include/boost/type_traits/type_with_alignment.hpp +++ b/include/boost/type_traits/type_with_alignment.hpp @@ -13,7 +13,7 @@ #include "boost/preprocessor/tuple/to_list.hpp" #include "boost/preprocessor/cat.hpp" #include "boost/type_traits/alignment_of.hpp" -#include "boost/type_traits/is_POD.hpp" +#include "boost/type_traits/is_pod.hpp" #include "boost/static_assert.hpp" #include "boost/config.hpp"