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

overloads of match(NSString* ) have wrong type to be overload of the base method, hence it does not compile on ObjectiveC++ #1571

Closed
pqnet opened this issue Mar 15, 2019 · 3 comments

Comments

@pqnet
Copy link

pqnet commented Mar 15, 2019

Catch does not compile on ObjC++ code (.mm files) with default configuration.

The reason is that the template signature of the base class which is overridden specify const & qualifier for argument of match function, while for NSString* the signature is specified as bool match( NSString* arg) override.

Replacing the signature on these methods with bool match( NSString* const& arg) override fixes the compile error

@pqnet pqnet changed the title overloads of match(NSString* ) have wrong type to be overload, hence do not compile overloads of match(NSString* ) have wrong type to be overload of the base method, hence it does not compile on ObjectiveC++ Mar 15, 2019
@horenmar
Copy link
Member

I don't really have access to ObjC compiler, but can you check that b0ddf1b fixes the problem?

Also, you can help prevent this from repeating by opening a PR that adds ObjC CI to Travis 😉

@pqnet
Copy link
Author

pqnet commented Apr 2, 2019

@horenmar it seems like you missed one at line 142, otherwise it is just the same as (the relevant portion) of my local corrected copy. I am not familiar with the codebase nor with Travis, I just downloaded the catch.hpp file and discovered the error, I am willing to open a pull request but it might require some time for me to get familiar with travis and create a test case.

@horenmar
Copy link
Member

horenmar commented Apr 3, 2019

Right, I did a search and replace and that signature was missing the override specifier. Should be fixed in master now, so I am going to close this and the test discussion can be done via our Discord.

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

No branches or pull requests

2 participants