From 6ed17a2b1009fc771ba8a289fbdf235cbc75cc71 Mon Sep 17 00:00:00 2001 From: Michal Lesiak Date: Fri, 16 Jun 2023 13:44:53 +0200 Subject: [PATCH 1/2] Replace is_callable_v with is_invocable --- .../include/bluegrass/meta/function_traits.hpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/libraries/meta_refl/include/bluegrass/meta/function_traits.hpp b/libraries/meta_refl/include/bluegrass/meta/function_traits.hpp index 3940c2d8f3..5f2ba12d24 100644 --- a/libraries/meta_refl/include/bluegrass/meta/function_traits.hpp +++ b/libraries/meta_refl/include/bluegrass/meta/function_traits.hpp @@ -65,11 +65,6 @@ namespace bluegrass { namespace meta { template constexpr bool pass_type() { return true; } - template - constexpr bool is_callable_impl(...) { - return false; - } - template struct wrapper_t { using type = T; @@ -81,12 +76,6 @@ namespace bluegrass { namespace meta { inline constexpr U&& make_dependent(U&& u) { return static_cast(u); } } - template - inline constexpr static bool is_callable_v = BLUEGRASS_HAS_MEMBER(AUTO_PARAM_WORKAROUND(FN), operator()); - - template - constexpr bool is_callable(F&& fn) { return BLUEGRASS_HAS_MEMBER(fn, operator()); } - namespace detail { template constexpr auto get_types(R(Args...)) -> std::tuple, Args>...>>; template constexpr auto get_types(F&& fn) { - if constexpr (is_callable_v) + if constexpr (std::is_invocable::value) return get_types(&F::operator()); else return get_types(fn); @@ -153,7 +142,7 @@ namespace bluegrass { namespace meta { constexpr auto parameters_from_impl(R(Cls::*)(Args...)const &&) -> pack_from_t; template constexpr auto parameters_from_impl(F&& fn) { - if constexpr (is_callable_v) + if constexpr (std::is_invocable::value) return parameters_from_impl(&F::operator()); else return parameters_from_impl(fn); From 7b058b424afe1d4e8ea698e5595d5b84508082bf Mon Sep 17 00:00:00 2001 From: Michal Lesiak Date: Fri, 16 Jun 2023 14:41:11 +0200 Subject: [PATCH 2/2] Add llvm on ubuntu22 --- .cicd/platforms.json | 3 +++ .cicd/platforms/ubuntu22-llvm.Dockerfile | 23 +++++++++++++++++++++++ .cicd/platforms/ubuntu22.Dockerfile | 2 +- .github/workflows/build.yaml | 2 +- 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 .cicd/platforms/ubuntu22-llvm.Dockerfile diff --git a/.cicd/platforms.json b/.cicd/platforms.json index 08910862ec..69f7a69afb 100644 --- a/.cicd/platforms.json +++ b/.cicd/platforms.json @@ -7,5 +7,8 @@ }, "ubuntu22": { "dockerfile": ".cicd/platforms/ubuntu22.Dockerfile" + }, + "ubuntu22-llvm": { + "dockerfile": ".cicd/platforms/ubuntu22-llvm.Dockerfile" } } diff --git a/.cicd/platforms/ubuntu22-llvm.Dockerfile b/.cicd/platforms/ubuntu22-llvm.Dockerfile new file mode 100644 index 0000000000..ff54bc3c98 --- /dev/null +++ b/.cicd/platforms/ubuntu22-llvm.Dockerfile @@ -0,0 +1,23 @@ +FROM ubuntu:jammy + +RUN apt-get update && apt-get upgrade -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential \ + cmake \ + wget \ + git \ + ninja-build \ + python3 \ + pkg-config \ + libboost-all-dev \ + libcurl4-gnutls-dev \ + lsb-release \ + software-properties-common \ + gnupg \ + clang-tidy + +RUN wget https://apt.llvm.org/llvm.sh +RUN chmod +x llvm.sh +RUN ./llvm.sh 16 + +ENV CC=clang-16 +ENV CXX=clang++-16 \ No newline at end of file diff --git a/.cicd/platforms/ubuntu22.Dockerfile b/.cicd/platforms/ubuntu22.Dockerfile index 67b04586a1..ca38aad5cd 100644 --- a/.cicd/platforms/ubuntu22.Dockerfile +++ b/.cicd/platforms/ubuntu22.Dockerfile @@ -9,4 +9,4 @@ RUN apt-get update && apt-get upgrade -y && \ pkg-config \ libboost-all-dev \ libcurl4-gnutls-dev \ - clang-tidy + clang-tidy \ No newline at end of file diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5345c2bfe1..fd75357002 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -60,7 +60,7 @@ jobs: strategy: fail-fast: false matrix: - platform: [ubuntu18, ubuntu20, ubuntu22] + platform: [ubuntu18, ubuntu20, ubuntu22, ubuntu22-llvm] runs-on: ["self-hosted", "enf-x86-beefy"] container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} steps: