From 0349d29c672a2a25bacffb207d3defc80103afdf Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 31 Jan 2005 13:50:40 +0000 Subject: [PATCH] Mode aligned_storage<>::type report true to is_pod. [SVN r26960] --- include/boost/type_traits/aligned_storage.hpp | 38 +++++++++++++++---- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/include/boost/type_traits/aligned_storage.hpp b/include/boost/type_traits/aligned_storage.hpp index 9de4a70..4bcca20 100755 --- a/include/boost/type_traits/aligned_storage.hpp +++ b/include/boost/type_traits/aligned_storage.hpp @@ -10,23 +10,45 @@ #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; - struct type{ - union - { - char m_buf[Len]; - aligned_type m_align; - }; - }; + typedef typename type_with_alignment::type aligned_type; + typedef detail::storage type; }; } // namespace boost +#include "boost/type_traits/detail/bool_trait_undef.hpp" #endif // BOOST_TT_ALIGNED_STORAGE_HPP_INCLUDED