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

Disable empty propagation if compiling as Objective-C++ to allow succ… #34

Closed
wants to merge 1 commit into from

Conversation

Rajveer86
Copy link

…essful compilation of non-copyable callables

@Naios


What was a problem?

Non-copyable lambdas failed to compile in Objective-C++.

How this PR fixes the problem?

This PR disables the bool() operator optimisation if the class is being compiled as Objective-C++.

Check lists (check x in [ ] of list items)

  • Additional Unit Tests were added that test the feature or regression
  • Coding style (Clang format was applied)

Additional Comments (if any)

Not sure how to add a unit test since it would require compiling as Objective-C++.

…essful compilation of non-copyable callables
@Rajveer86 Rajveer86 requested a review from Naios as a code owner December 12, 2019 21:32
@Naios
Copy link
Owner

Naios commented Dec 12, 2019

I would prefer to improve the corresponding code in the empty bool propagation rather than making the behaviour dependent on the current build language since a change in the behaviour without explicit specification is a no-go.

@Naios
Copy link
Owner

Naios commented Dec 12, 2019

I will close this as elaborated above and in #29.
Feel free to open a new PR if you found a fix for the non working operator bool detection trait in Objective+C++.

@Naios Naios closed this Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants