MWCW patch

[SVN r7685]
This commit is contained in:
John Maddock
2000-08-05 11:53:02 +00:00
parent 8982e52a5f
commit 47cb52e1a1

View File

@ -487,17 +487,21 @@ struct is_convertible<void, void>
};
//
// get the alignment of some arbitrary type:
namespace detail{
// hack for MWCW:
template <class T>
class alignment_of_hack
{
char c;
T t;
alignment_of_hack();
};
}
template <class T>
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<T>) - sizeof(T);
};
//
// references have to be treated specially, assume
@ -609,3 +613,4 @@ public: