From 3b4c1be825a31ce395231a448d110ff3ab8aaca4 Mon Sep 17 00:00:00 2001 From: artpaul Date: Thu, 22 May 2025 03:38:41 +0500 Subject: [PATCH 1/2] remove extra constructors --- CMakeLists.txt | 5 +++++ include/acto/acto.h | 16 ---------------- llvm-toolchain.cmake | 4 ++++ 3 files changed, 9 insertions(+), 16 deletions(-) create mode 100644 llvm-toolchain.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index db65864..a63d06f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,11 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wextra -Wshadow -Wsign-compare -Wshadow -Wwrite-strings -Wpointer-arith -Winit-self -Wconversion -Wno-sign-conversion") endif() + if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++abi") + endif() + set(ACTO_BUILD_SAMPLES ON) set(ACTO_BUILD_TESTS ON) elseif(NOT CMAKE_CXX_STANDARD) diff --git a/include/acto/acto.h b/include/acto/acto.h index 4c74bff..8175ce3 100644 --- a/include/acto/acto.h +++ b/include/acto/acto.h @@ -105,11 +105,6 @@ template struct message_container : private T { static constexpr bool is_value_movable = false; - constexpr message_container(T&& t) noexcept( - std::is_nothrow_move_constructible_v) - : T(std::move(t)) { - } - template constexpr message_container(Args&&... args) noexcept( std::is_nothrow_constructible_v) @@ -129,11 +124,6 @@ template struct message_container { static constexpr bool is_value_movable = std::is_move_constructible::value; - constexpr message_container(T&& t) noexcept( - std::is_nothrow_move_constructible_v) - : value_(std::move(t)) { - } - template constexpr message_container(Args&&... args) noexcept( std::is_nothrow_constructible_v) @@ -160,12 +150,6 @@ template struct msg_wrap_t : public msg_t , public message_container_t { - constexpr msg_wrap_t(T&& d) noexcept( - std::is_nothrow_constructible_v, T&&>) - : msg_t(typeid(T)) - , message_container_t(std::move(d)) { - } - template constexpr msg_wrap_t(Args&&... args) noexcept( std::is_nothrow_constructible_v, Args...>) diff --git a/llvm-toolchain.cmake b/llvm-toolchain.cmake new file mode 100644 index 0000000..5b27ce1 --- /dev/null +++ b/llvm-toolchain.cmake @@ -0,0 +1,4 @@ +set(LLVM_ROOT /usr/lib/llvm-18) +set(CMAKE_C_COMPILER ${LLVM_ROOT}/bin/clang) +set(CMAKE_CXX_COMPILER ${LLVM_ROOT}/bin/clang++) +set(CMAKE_EXE_LINKER_FLAGS "--ld-path=${LLVM_ROOT}/bin/ld.lld") From e3f178ac752c6d197322e8101d7a0bfea3813613 Mon Sep 17 00:00:00 2001 From: artpaul Date: Thu, 22 May 2025 03:40:31 +0500 Subject: [PATCH 2/2] fix --- CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a63d06f..db65864 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,11 +19,6 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wextra -Wshadow -Wsign-compare -Wshadow -Wwrite-strings -Wpointer-arith -Winit-self -Wconversion -Wno-sign-conversion") endif() - if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++abi") - endif() - set(ACTO_BUILD_SAMPLES ON) set(ACTO_BUILD_TESTS ON) elseif(NOT CMAKE_CXX_STANDARD)