X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fcollection.h;h=a7ac59bc8069b19697fab896826ef499b3a84e8d;hb=8b7cadfa3b5a72ecf466c589e1c8328d8500b588;hp=7a09f5047d501dc0d361744b25c3714b36a5409a;hpb=7184146e19a45f968a4bc4d0cee252f13dbeb7c5;p=libs%2Fdatafile.git 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;