diff --git a/include/boost/detail/type_traits.hpp b/include/boost/detail/type_traits.hpp index 429889c..6d109d0 100644 --- a/include/boost/detail/type_traits.hpp +++ b/include/boost/detail/type_traits.hpp @@ -334,7 +334,7 @@ template struct is_pointer { static const bool value = true; }; //* is a type T a reference type - is_reference template struct is_reference { static const bool value = false; }; template struct is_reference { static const bool value = true; }; -#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x551) +#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x550) // these are illegal specialisations; cv-qualifies applied to // references have no effect according to [8.3.2p1], // C++ Builder requires them though as it treats cv-qualified @@ -487,21 +487,17 @@ 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(detail::alignment_of_hack) - sizeof(T); + static const unsigned value = sizeof(padded) - sizeof(T); }; // // references have to be treated specially, assume @@ -613,4 +609,3 @@ public: -