From b4abc587410320408c8f781061c503f4f3e78b19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Vr=C3=A1til?= Date: Mon, 2 May 2022 21:15:09 +0200 Subject: [PATCH] Fix build with apple-clang libc++ doesn't implement any concepts yet, use variable templates instead. --- qcoro/task.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qcoro/task.h b/qcoro/task.h index a8932d08..ce4bcfb9 100644 --- a/qcoro/task.h +++ b/qcoro/task.h @@ -554,27 +554,27 @@ class Task { * returns an awaitable (Task) then the result of then is the awaitable. */ template - requires (std::invocable || (!std::is_void_v && std::invocable)) + requires (std::is_invocable_v || (!std::is_void_v && std::is_invocable_v)) auto then(ThenCallback &&callback) { return thenImpl(std::forward(callback)); } template - requires ((std::invocable || (!std::is_void_v && std::invocable)) && - std::invocable) + requires ((std::is_invocable_v || (!std::is_void_v && std::is_invocable_v)) && + std::is_invocable_v) auto then(ThenCallback &&callback, ErrorCallback &&errorCallback) { return thenImpl(std::forward(callback), std::forward(errorCallback)); } private: template - requires (std::invocable) + requires (std::is_invocable_v) auto invoke(ThenCallback &&callback, Args && ...) { return callback(); } template - requires (std::invocable) + requires (std::is_invocable_v) auto invoke(ThenCallback &&callback, Arg && arg) { return callback(std::forward(arg)); }