From 97793c700eaa68358d768826a58feee21742ac57 Mon Sep 17 00:00:00 2001 From: Curve Date: Sat, 17 Aug 2024 16:37:52 +0200 Subject: [PATCH 1/2] fix: disable `use_bool_op` in objective c (#32) --- include/function2/function2.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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) From a469cf02b534597e7db6173eaddc18e0c8727c74 Mon Sep 17 00:00:00 2001 From: Curve Date: Mon, 23 Dec 2024 17:18:53 +0100 Subject: [PATCH 2/2] refactor(cmake): always install headers --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 .)