Opened 10 years ago
Last modified 10 years ago
#8278 reopened Bugs
BOOST_ASSERT_MSG prerocessed out if NDEBUG is defined regardless of BOOST_ENABLE_ASSERT_HANDLER
Reported by: | Eric Niebler | Owned by: | Beman Dawes |
---|---|---|---|
Milestone: | To Be Determined | Component: | utility |
Version: | Boost 1.52.0 | Severity: | Problem |
Keywords: | Cc: |
Description
There is an inconsistency in boost/assert.hpp. The macros BOOST_ASSERT
and BOOST_VERIFY
are *not* preprocessed out when BOOST_ENABLE_ASSERT_HANDLER
is defined, but BOOST_ASSERT_MSG
is. The inconsistency should be resolved one way or the other, and I think making BOOST_ASSERT_MSG
behave like the other two makes the most sense.
Assigning to you, Peter, since you created this file. Please reassign as appropriate.
Attachments (1)
Change History (7)
comment:1 by , 10 years ago
Owner: | changed from | to
---|
comment:3 by , 10 years ago
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
I don't believe this issue is a dupe of #7028. That issue (which I disagree with) suggests that all the assert macros be processed out when NDEBUG
is defined, even when BOOST_ENABLE_ASSERT_HANDLER
is defined. This issue is specifically about making BOOST_ASSERT_MSG
consistent with the other macros, which are currently left in always when BOOST_ENABLE_ASSERT_HANDLER
is defined.
follow-up: 5 comment:4 by , 10 years ago
#7028 patch makes the 3 macros uniform. Could you provide a patch that clarifies what do you expect?
comment:5 by , 10 years ago
by , 10 years ago
Attachment: | assert.patch added |
---|
comment:6 by , 10 years ago
I've attached a patch that addressed the problem the way I think it should be addressed, and the way that is least surprising for existing users of BOOST_ASSERT
. It should be applied to trunk as it is as of [83430].
I think that Beman added the _MSG variants. I agree that ASSERT_MSG should follow ASSERT.