From ac5c8d0c85d1f3111ea6319018b36ec95ac19177 Mon Sep 17 00:00:00 2001 From: Mathis Beer Date: Mon, 24 Jan 2022 12:47:05 +0100 Subject: [PATCH] Fix issue 22701: Remove is(typeof()) callable check in std.typecons.apply. It creates unreadable template errors for no benefit. --- std/typecons.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/std/typecons.d b/std/typecons.d index ac1d8b39f..28edb9b8c 100644 --- a/std/typecons.d +++ b/std/typecons.d @@ -4042,7 +4042,7 @@ template apply(alias fun) import std.functional : unaryFun; auto apply(T)(auto ref T t) - if (isInstanceOf!(Nullable, T) && is(typeof(unaryFun!fun(T.init.get)))) + if (isInstanceOf!(Nullable, T)) { alias FunType = typeof(unaryFun!fun(T.init.get));