From 3d4687e1f179d8778eec72056165db47741efc75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pedro=20Bol=C3=ADvar=20Puente?= Date: Mon, 11 Jul 2022 12:57:56 +0200 Subject: [PATCH 1/3] Fix combining modern Clang with libstdc++ --- lager/effect.hpp | 12 ++++++++++-- shell.nix | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/lager/effect.hpp b/lager/effect.hpp index a1e18dcb..ca53fd3a 100644 --- a/lager/effect.hpp +++ b/lager/effect.hpp @@ -47,6 +47,13 @@ lager::effect, ...> " // effect& operator=(const effect&) = default; effect& operator=(effect&&) = default; + effect(base_t&& base) + : base_t{std::move(base)} + {} + effect(base_t const& base) + : base_t{base} + {} + template && @@ -58,8 +65,9 @@ lager::effect, ...> " // template < typename Fn, - std::enable_if_t>, - int> = 0> + std::enable_if_t< + std::is_same_v>, + int> = 0> effect(Fn&& fn) : base_t{[fn = std::forward(fn)](auto&& ctx) -> future { fn(ctx); diff --git a/shell.nix b/shell.nix index c880e708..de6d6f59 100644 --- a/shell.nix +++ b/shell.nix @@ -1,7 +1,7 @@ { compiler ? "", - rev ? "e1118817a12dba39081d9e70ae52dd38aa184c2e", - sha256 ? "04jhgyr5ibdhjay3s5jx11q5y9mfn8nd8lr941b0jlpky89a1pjw", + rev ? "f904e3562aabca382d12f8471ca2330b3f82899a", + sha256 ? "1lsa3sjwp1v3nv2jjpkl5lf9dncplwihmavasalg9fq1217pmzmb", nixpkgs ? builtins.fetchTarball { name = "nixpkgs-${rev}"; url = "https://github.com/nixos/nixpkgs/archive/${rev}.tar.gz"; From 8017ce11e6ae3fcf78c9f3fb50a7765c5e759de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pedro=20Bol=C3=ADvar=20Puente?= Date: Mon, 11 Jul 2022 13:17:51 +0200 Subject: [PATCH 2/3] Try another fix --- lager/effect.hpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/lager/effect.hpp b/lager/effect.hpp index ca53fd3a..9041e379 100644 --- a/lager/effect.hpp +++ b/lager/effect.hpp @@ -47,13 +47,6 @@ lager::effect, ...> " // effect& operator=(const effect&) = default; effect& operator=(effect&&) = default; - effect(base_t&& base) - : base_t{std::move(base)} - {} - effect(base_t const& base) - : base_t{base} - {} - template && @@ -74,6 +67,17 @@ lager::effect, ...> " // return {}; }} {} + + template < + typename Fn, + std::enable_if_t< + !std::is_same_v, effect> && + std::is_same_v>, + int> = 0> + effect(Fn&& fn) + : base_t{std::forward(fn)} + {} }; /*! From c8dbea3aa6c7023b06a7315e774afc160daa1529 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pedro=20Bol=C3=ADvar=20Puente?= Date: Mon, 11 Jul 2022 13:49:32 +0200 Subject: [PATCH 3/3] Arg --- lager/effect.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lager/effect.hpp b/lager/effect.hpp index 9041e379..9a6d35d2 100644 --- a/lager/effect.hpp +++ b/lager/effect.hpp @@ -71,7 +71,7 @@ lager::effect, ...> " // template < typename Fn, std::enable_if_t< - !std::is_same_v, effect> && + !std::is_convertible_v, effect> && std::is_same_v>, int> = 0>