diff --git a/CMakeLists.txt b/CMakeLists.txt index e0eb44e..1b2f455 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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} @@ -36,6 +36,8 @@ 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) @@ -43,8 +45,6 @@ if (FU2_IS_TOP_LEVEL_PROJECT) # 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 .) diff --git a/include/function2/function2.hpp b/include/function2/function2.hpp index ffb82b5..d84ea2d 100644 --- a/include/function2/function2.hpp +++ b/include/function2/function2.hpp @@ -1408,7 +1408,12 @@ struct accepts_all< void_t::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 +struct use_bool_op : std::false_type {}; +#elif defined(FU2_HAS_NO_EMPTY_PROPAGATION) template struct use_bool_op : std::false_type {}; #elif defined(FU2_HAS_LIMITED_EMPTY_PROPAGATION)