$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: John Maddock (john_at_[hidden])
Date: 2005-12-13 05:54:18
> The only time that I get warning 6385 is when id is equal to or
> exceeds the size of the array. It is a little strange in that the
> warning only occurs when the line beginning with _ASSERTE is added. There
> should be an error even without the debug assertion. Nevertheless this
> suggests that there may be a case where
> re_detail::get_default_class_id(() returns a value in excess of 18
> leading to the warning. The following pseudo-code compiles without
> warning
> or error and has the slight advantage if protecting release as well
> as debug builds:
> std::size_t id = (1 + re_detail::get_default_class_id(p1, p2));
> if(id < sizeof(masks) / sizeof(masks[0]))
> return masks[id];
> return masks[0];
I still think that's redundant code, but I'll make the change anyway.
>> Understood, but what other warnings were you seeing? <
>
> Here is the build log which already incorporates the above code
> fragment: http://users.erols.com/gmgarner/boost/BuildLog_regex.txt.
OK thanks, there's only one warning in there I hadn't seen before (and isn't
fixed now), and that's this one:
h:\source
code\boost\boost_1_33_1\boost\type_traits\is_member_function_pointer.hpp(67)
: error C6334: sizeof operator applied to an expression with an operator
might yield unexpected results
Looking up the warning on MSDN it says:
"This warning indicates a misuse of the sizeof operator. The sizeof
operator, when applied to an expression, yields the size of the type of the
resulting expression. "
But that's exactly what we want it to do! So no fixes possible there.
Thanks for all the feedback on this,
John.