X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcore%2Fmeta.h;h=35373013e5eb91d6faceae24592dcd298f4b1280;hp=d6ca35935543049d8026b842ecca40785a92ecae;hb=HEAD;hpb=e83bcaa01b98b600171886ff6b06d884385dd0ed diff --git a/source/core/meta.h b/source/core/meta.h index d6ca359..3537301 100644 --- a/source/core/meta.h +++ b/source/core/meta.h @@ -2,37 +2,46 @@ #define MSP_CORE_META_H_ #include +#include "attributes.h" namespace Msp { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" template -struct RemoveConst +struct DEPRECATED RemoveConst { typedef T Type; }; template -struct RemoveConst +struct DEPRECATED RemoveConst { typedef T Type; }; template -struct RemoveReference +struct DEPRECATED RemoveReference { typedef T Type; }; template -struct RemoveReference +struct DEPRECATED RemoveReference { typedef T Type; }; +template +struct DEPRECATED RemoveConstReference +{ typedef typename RemoveConst::Type>::Type Type; }; + + template -struct EnableIf; +struct DEPRECATED EnableIf; template -struct EnableIf +struct DEPRECATED EnableIf { typedef R Yes; }; template -struct EnableIf +struct DEPRECATED EnableIf { typedef R No; }; +#pragma GCC diagnostic pop /** @@ -53,6 +62,18 @@ struct Sfinae }; }; + +struct CheckEqualityComparable: Sfinae +{ + static int &v; + template + static Yes f(int (*)[sizeof(reinterpret_cast(v)==reinterpret_cast(v))]); + using Sfinae::f; +}; + +template +struct IsEqualityComparable: Sfinae::Evaluate { }; + } // namespace Msp #endif