Skip to content

Include missing key value in assert message#6

Open
rschlaikjer wants to merge 3 commits into
mujinfrom
rs-assert-messages
Open

Include missing key value in assert message#6
rschlaikjer wants to merge 3 commits into
mujinfrom
rs-assert-messages

Conversation

@rschlaikjer

Copy link
Copy Markdown

This adds the macro RAPIDJSON_ASSERT_MSG, which by default proxies back to the base RAPIDJSON_ASSERT.

With the cassert backend it only works for literal messages, since cassert relies on macro stringification, but by overriding it to use BOOST_ASSERT_MSG it's possible to use dynamic messages.

To take advantage of the new behaviour, callers should add

add_definitions("-DRAPIDJSON_ASSERT_MSG=BOOST_ASSERT_MSG")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants