From 4122b64ecd25648ffd792a8733a633343197fbee Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 25 Nov 2021 22:09:01 +1100 Subject: [PATCH] Avoid using standard concepts Turns out those are unimplemented in clang < 13, use custom code instead. --- src/utils.hh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/utils.hh b/src/utils.hh index 9d6bace5..21ed5fd3 100644 --- a/src/utils.hh +++ b/src/utils.hh @@ -4,7 +4,6 @@ #include "assert.hh" #include -#include namespace Kakoune { @@ -175,10 +174,9 @@ public: {} template - requires requires (Target t, Args... a) { - requires not std::is_same_v>; - { t(a...) } -> std::convertible_to; - } + requires (not std::is_same_v> and + (std::is_void_v or + requires (Target t, Args... a, void(&func)(Res)) { func(t(a...)); })) FunctionRef(Target&& target) : m_target{&target}, m_invoker{[](void* target, Args... args) {