
13 Mar
2005
13 Mar
'05
7:12 p.m.
Thorsten Ottosen wrote:
"David Abrahams" <dave@boost-consulting.com> wrote in message news:ubr9ow6b6.fsf@boost-consulting.com...
There's no guarantee that the integer type will have sufficient size.
BOOST_STATIC_ASSERT( sizeof(void*) >= sizeof(std::size_t))
?
The reverse, probably. Technically, it's still not enough; sizeof gives you the size of the object in chars, not the number of value bits. This aside, the assert doesn't tell you whether reinterpret_cast produces a reasonable hash value; this is an inherently non-portable characteristic of the particular platform.