diff --git a/include/boost/aligned_storage.hpp b/include/boost/aligned_storage.hpp index 17247c2..bd16739 100644 --- a/include/boost/aligned_storage.hpp +++ b/include/boost/aligned_storage.hpp @@ -19,10 +19,13 @@ #include "boost/detail/workaround.hpp" #include "boost/type_traits/alignment_of.hpp" #include "boost/type_traits/type_with_alignment.hpp" +#include "boost/type_traits/is_pod.hpp" #include "boost/mpl/eval_if.hpp" #include "boost/mpl/identity.hpp" +#include "boost/type_traits/detail/bool_trait_def.hpp" + namespace boost { namespace detail { namespace aligned_storage { @@ -55,6 +58,8 @@ private: // representation public: // constants + typedef aligned_storage type; + BOOST_STATIC_CONSTANT( std::size_t , size = size_ @@ -132,6 +137,18 @@ const void* aligned_storage::address() const #endif // MSVC6 workaround +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +template +struct is_pod > + BOOST_TT_AUX_BOOL_C_BASE(true) +{ + BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(true) +}; +#endif + + } // namespace boost +#include "boost/type_traits/detail/bool_trait_undef.hpp" + #endif // BOOST_ALIGNED_STORAGE_HPP diff --git a/include/boost/type_traits/aligned_storage.hpp b/include/boost/type_traits/aligned_storage.hpp index 4bcca20..634fa74 100755 --- a/include/boost/type_traits/aligned_storage.hpp +++ b/include/boost/type_traits/aligned_storage.hpp @@ -7,48 +7,6 @@ // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_ALIGNED_STORAGE_HPP_INCLUDED -#define BOOST_TT_ALIGNED_STORAGE_HPP_INCLUDED - -#include "boost/type_traits/type_with_alignment.hpp" -#include - -// should be the last #include -#include "boost/type_traits/detail/bool_trait_def.hpp" - -namespace boost { - -namespace detail{ - -template -struct storage -{ - union - { - char m_buf[N]; - T m_align; - }; -}; - -} - -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -template -struct is_pod > - BOOST_TT_AUX_BOOL_C_BASE(true) -{ - BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(true) -}; -#endif - -template -struct aligned_storage -{ - typedef typename type_with_alignment::type aligned_type; - typedef detail::storage type; -}; - -} // namespace boost - -#include "boost/type_traits/detail/bool_trait_undef.hpp" - +# define BOOST_TT_ALIGNED_STORAGE_HPP_INCLUDED +# include #endif // BOOST_TT_ALIGNED_STORAGE_HPP_INCLUDED