Skip to content

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

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.11)
project(function2 VERSION 4.2.0 LANGUAGES CXX)
project(function2 VERSION 4.2.3 LANGUAGES CXX)

if (NOT FU2_IS_FIND_INCLUDED)
string(COMPARE EQUAL ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}
Expand Down Expand Up @@ -36,15 +36,15 @@ target_compile_features(function2
cxx_trailing_return_types
cxx_return_type_deduction)

install(DIRECTORY "include/function2" TYPE INCLUDE)

if (FU2_IS_TOP_LEVEL_PROJECT)
include(ExternalProject)
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)

# Create an install target:
# Headers and license files
install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/function2"
DESTINATION "include")
install(FILES "LICENSE.txt" DESTINATION .)
install(FILES "Readme.md" DESTINATION .)

Expand Down
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