You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Standard says main takes char**, that is a pointer to char*. That thing doesn't implicitly convert to const char** (pointer to const char*). So there'd need to be extra overloads and some const_casts for this usage.
@lightmare I see your point. Thats a real shame as the parameter is not being modified and strictly speaking isconst - but I get your point that this is painful when passing arguments from main.
I set the arguments programatically because I am embedding Catch into a platform abstraction, and really currently only use it to set the application name - so the junit define doesn't help but I may use it in the future - thanks.
The solution for me is to simply perform the casting myself, which seems reasonable.
Thank you for your reply.
Description
I configure Catch programmatically like this:
This throws a compiler warning
Steps to reproduce
Use the code snippet above.
Extra information
As of C++11 the implicit conversion from
char *
toconst char *
has been deprecated.To fix this the signatures can be changed to:
I have tested this on the version below and it seems to work fine.
The text was updated successfully, but these errors were encountered: