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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion include/function2/function2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,12 @@ struct accepts_all<
void_t<std::enable_if_t<accepts_one<T, Signatures>::value>...>>
: std::true_type {};

#if defined(FU2_HAS_NO_EMPTY_PROPAGATION)
#if defined(__OBJC__)
/// In Objective C lambdas can be implicitly converted to block pointers,
/// thus causing the copy constructor to be invoked.
template <typename T>
struct use_bool_op : std::false_type {};
#elif defined(FU2_HAS_NO_EMPTY_PROPAGATION)
template <typename T>
struct use_bool_op : std::false_type {};
#elif defined(FU2_HAS_LIMITED_EMPTY_PROPAGATION)
Expand Down