Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid conversion from const* void to void* warning when using DEBUG_ASSERT with message #16

Closed
Manu343726 opened this issue Dec 18, 2018 · 5 comments

Comments

@Manu343726
Copy link
Contributor

Manu343726 commented Dec 18, 2018

Debian Linux GCC 8.1 C++11 ABI with -Wall -pedantic, debug_assert 1.3.3 (from conan). If I do a plain assert like this:

DEBUG_ASSERT(<condition>, assert_handler{});

it works, but whenever I add an error message:

DEBUG_ASSERT(<condition>, assert_handler{}, "my custom message");

I get a warning about a void* conversion:

/home/manuel/.conan/data/debug_assert/1.3.3/Manu343726/testing/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/debug_assert.hpp:279:65: error: invalid conversion from ‘const void*’ to ‘void*’ [-fpermissive]
                                      || noexcept(Handler::handle(loc, expression, detail::forward<Args>(args)...)))                                             
                                  ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                 
@Manu343726
Copy link
Contributor Author

I could try to fix it myself this weekend.

@foonathan
Copy link
Owner

What is your assert_handler?

@Manu343726
Copy link
Contributor Author

@foonathan
Copy link
Owner

Then that's an odd error.

@foonathan
Copy link
Owner

Closing as I can't reproduce.

Maybe the error is in the condition?

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

No branches or pull requests

2 participants