From 47cb52e1a1cd7fede1b457c927f7ffda9a11aafd Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sat, 5 Aug 2000 11:53:02 +0000 Subject: [PATCH] MWCW patch [SVN r7685] --- include/boost/detail/type_traits.hpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/include/boost/detail/type_traits.hpp b/include/boost/detail/type_traits.hpp index 6d109d0..31778b3 100644 --- a/include/boost/detail/type_traits.hpp +++ b/include/boost/detail/type_traits.hpp @@ -487,17 +487,21 @@ struct is_convertible }; // // get the alignment of some arbitrary type: +namespace detail{ +// hack for MWCW: +template +class alignment_of_hack +{ + char c; + T t; + alignment_of_hack(); +}; +} template class alignment_of { - struct padded - { - char c; - T t; - padded(); - }; public: - static const unsigned value = sizeof(padded) - sizeof(T); + static const unsigned value = sizeof(detail::alignment_of_hack) - sizeof(T); }; // // references have to be treated specially, assume @@ -609,3 +613,4 @@ public: +