From 8b7cadfa3b5a72ecf466c589e1c8328d8500b588 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 26 Mar 2013 22:37:08 +0200 Subject: [PATCH] Use the Sfinae helper struct from mspcore --- source/collection.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source/collection.h b/source/collection.h index 7a09f50..a7ac59b 100644 --- a/source/collection.h +++ b/source/collection.h @@ -17,17 +17,14 @@ namespace DataFile { Helper struct to determine whether a Loader has a Collection typedef. */ template -struct NeedsCollection +struct NeedsCollection: public Sfinae { - struct Yes { char c[2]; }; - struct No { char c; }; - template static Yes f(typename U::Collection *); template static No f(...); - enum { value = (sizeof(f(0))==sizeof(Yes)) }; + enum { value = Evaluate(0))>::value }; }; class CollectionItemTypeBase; -- 2.43.0