[*] AuTryConstruct didn't work becasue AuIsConstructible was returning spurious values

This commit is contained in:
Reece Wilson 2022-04-04 08:44:04 +01:00
parent 11ebcde5c2
commit 46e5adf947

View File

@ -288,8 +288,8 @@ using AuEnableIf_t = typename AuEnableIf<Test, T>::type;
template <class T, class ... Args>
struct AuIsConstructible
{
template <class C, class ... Args2> static constexpr AuTrueType Test(decltype(C(AuDeclVal<Args2>()...)));
static constexpr AuFalseType Test(...);
template <class C, class ... Args2> static constexpr AuTrueType Test(decltype(::new C(AuDeclVal<Args2>()...)));
template <class C, class ... Args2> static constexpr AuFalseType Test(...);
using type = decltype(Test<T, Args...>(0));
};
@ -297,7 +297,7 @@ template <class T, class ... Args>
using AuIsConstructible_t = typename AuIsConstructible<T, Args ...>::type;
template <class T, class ... Args>
inline constexpr bool AuIsConstructible_v = AuIsConstructible_t<T, Args ...>::value;
inline constexpr bool AuIsConstructible_v = AuIsConstructible<T, Args ...>::type::value;
template <bool Test, class T, class T2>
struct AuConditional