function2 icon indicating copy to clipboard operation
function2 copied to clipboard

fix: disable `use_bool_op` in objective c (#32)

Open Curve opened this issue 1 year ago • 0 comments

@Naios


What was a problem?

See #32

How this PR fixes the problem?

This PR disables use_bool_op when Objective C is detected.

I would appreciate some help to to update this PR to a more robust implementation though. I've written a small POC that adds an additional check to has_bool_op that fails when the given type is convertible to a block-pointer: https://godbolt.org/z/GhM63xYnd

The implementation seen above is not implemented in this PR as I've used std::function to deduce the return and parameter types. I tried to do this with the function_trait found in the library, however, it does not seem to cover lambdas ootb, so I figured I might ask here first before modifying function_trait.

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

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

I've migrated the PR from #32 because I was am using the master branch from the fork in another project - I totally forgot I had submitted a PR thus I had pushed more changes onto said branch. To keep things tidy, this PR was created :)

Curve avatar Dec 24 '24 15:12 Curve