Stop reporting 948 for expressions in C++11 static_assert()'s
Since C++11, static_assert can be used to express conditions which have to be met at compile time and PC-lint claims to support this since version 9.00k.
But even with 9.00L with co-msc110, env-vc10 and au-misra-cpp, the following code will trigger a 948:
static const sizet SOMESIZE = 42U;
staticassert( SOMESIZE < 100U, "..." ); // Triggers Note 948: Operator '<' always evaluates to True
This should not be reported, as this is exactly the point of static_assert to always evaluate to true!
8
votes
![](https://secure.gravatar.com/avatar/8b4ccebdee93de63bfc2578bf0493aa0?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
This issue has been corrected in the upcoming PC-lint Plus.