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: +