From baa5926a62eb2e1e7e4263d7aed77e0518fc4b7b Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Tue, 4 Aug 2015 21:06:28 -0400 Subject: [PATCH] compiler bug fixes have simplified this --- web.d | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/web.d b/web.d index fc4e002..8cf4b65 100644 --- a/web.d +++ b/web.d @@ -844,49 +844,36 @@ template isEnum(alias T) if(is(T)) { enum bool isEnum = false; } +template isEnum(alias T) if(!is(T)) { + enum bool isEnum = false; +} + // WTF, shouldn't is(T == xxx) already do this? template isEnum(T) if(!is(T)) { enum bool isEnum = false; } -template isStruct(alias T) if(is(T)) { +template isStruct(alias T) { static if (is(T == struct)) enum bool isStruct = true; else enum bool isStruct = false; } -// WTF -template isStruct(T) if(!is(T)) { - enum bool isStruct = false; -} - - -template isApiObject(alias T) if(is(T)) { +template isApiObject(alias T) { static if (is(T : ApiObject)) enum bool isApiObject = true; else enum bool isApiObject = false; } -// WTF -template isApiObject(T) if(!is(T)) { - enum bool isApiObject = false; -} - -template isApiProvider(alias T) if(is(T)) { +template isApiProvider(alias T) { static if (is(T : ApiProvider)) enum bool isApiProvider = true; else enum bool isApiProvider = false; } -// WTF -template isApiProvider(T) if(!is(T)) { - enum bool isApiProvider = false; -} - - template Passthrough(T) { T Passthrough; }