BOOST_STATIC_ASSERT_MSG causes unsupressable warning

This line: BOOST_STATIC_ASSERT_MSG(false, "Some error text"); causes Resharper C++ to give a warning (Yellow exclamation icon at the top of the scroll bar).

This line is added to a template to prevent it from being instantiated on unsupported types and the compiler has no problems with it as these unsupported types are not used.

Resharper C++ does flag it as a warning and I would like to suppress this warning as I like to work towards the Green, everything is OK status. Is this possible?

 

0
4 comments
Avatar
Permanently deleted user

Hello Tim,

We'll make it possible to disable a static_assert failure via a comment in the next release (I filed https://youtrack.jetbrains.com/issue/RSCPP-16869 to track it).

In the meantime you can surround the static assert with an #ifdef __RSCPP_VERSION so R++ skips over that block code.

Thanks!

0
Avatar
Tim van Halteren

That was fast. Thanks.It works.

0
Avatar
Permanently deleted user

Tim,

ReSharper 2016.1.2 is out and it should contains the fix for the static_assert analysis. The highlighting has configurable severity now and it is possible to disable it using a comment.

Thanks!

0
Avatar
Tim van Halteren

Just tried it. Works great. Thank you also for following up. 

Cheers, Tim

0

Please sign in to leave a comment.