[+] AuIsEqualOfEnum
[+] AuGetAmbiguousMethodNoArgs [+] AuGetAmbiguousStaticFunction [+] AuGetAmbiguousStaticFunctionNoArgs
This commit is contained in:
parent
c5780976a1
commit
f6bcade29c
@ -447,6 +447,11 @@ static auto AuGetAmbiguousMethod2(Ret_t(T :: *a)(Args...))
|
||||
return a;
|
||||
}
|
||||
|
||||
template <class Ret_t, class ...Args>
|
||||
static auto AuGetAmbiguousFunction2(Ret_t(*a)(Args...))
|
||||
{
|
||||
return a;
|
||||
}
|
||||
|
||||
// According to MSVC: "only function types and reference types can't be const qualified"
|
||||
|
||||
@ -488,8 +493,9 @@ struct AuIsObject : AuBoolType<AuIsObject_v<T>>
|
||||
// I dont think I can easily implement these in templates
|
||||
// For the sake of syntax sugar, these will be macros for now
|
||||
#define AuGetAmbiguousMethod(Ret_t, Args, T, Method) AuGetAmbiguousMethod2<Ret_t, T, AU_BRACKET_SCOPE Args>(&T::Method)
|
||||
|
||||
#define AuGetAmbiguousMethod_v AuGetAmbiguousMethod
|
||||
#define AuGetAmbiguousMethodNoArgs(Ret_t, T, Method) AuGetAmbiguousMethod2<Ret_t, T> (&T::Method)
|
||||
#define AuGetAmbiguousStaticFunction(Ret_t, Args, T, Func) AuGetAmbiguousFunction2<Ret_t, AU_BRACKET_SCOPE Args> (&T::Func)
|
||||
#define AuGetAmbiguousStaticFunctionNoArgs(Ret_t, T, Func) AuGetAmbiguousFunction2<Ret_t> (&T::Func)
|
||||
|
||||
namespace _audetail
|
||||
{
|
||||
@ -820,3 +826,15 @@ struct AuIsNothrowDefaultConstructible : AuIsNothrowConstructible<T>
|
||||
|
||||
template <class T>
|
||||
constexpr bool AuIsNothrowDefaultConstructible_v = AuIsNothrowDefaultConstructible<T>::value;
|
||||
|
||||
template <class T>
|
||||
constexpr bool AuIsEqualOfEnum(T cmp)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
template <class T, T e, T... args>
|
||||
constexpr bool AuIsEqualOfEnum(T cmp)
|
||||
{
|
||||
return e == cmp || AuIsEqualOfEnum<T, args...>(cmp);
|
||||
}
|
Loading…
Reference in New Issue
Block a user