
John,
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. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html.... In any event, the specific line that is generating the warning is the following: 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]; Regards, George.