Boost logo

Boost :

From: George M. Garner Jr. (gmgarner_at_[hidden])
Date: 2005-12-12 16:12:37


> and in any case each element in
> the array is 8-bytes (32-bit pointers) or 16-bytes (64-bit pointers), so
> the
> alignment and size must be a multiple of 8 even if there are an odd number
> of elements.

Yes. You're right. I missed that. In any event the sizeof operator is
documented to be aligned on WORD boundaries and your expression is expressly
documented to work.

In any event, the specific line that is generating the warning is the

BOOST_ASSERT(id < sizeof(masks) / sizeof(masks[0]));

Since the following code does not generate this warning I will need to dig
further into the boost assert macro to answer the question:

if(id < sizeof(masks) / sizeof(masks[0]))
    return masks[id];
return masks[0];



Boost list run by bdawes at, gregod at, cpdaniel at, john at