Index: include/type_traits =================================================================== --- include/type_traits +++ include/type_traits @@ -1544,16 +1544,21 @@ // Otherwise, return "std::declval<_Up&>().~_Up()" is well-formed // where _Up is remove_all_extents<_Tp>::type +template +struct __is_destructible_apply { typedef int type; }; + template struct __is_destructor_wellformed { - template ().~_Tp1())> - static char __test (int); + template + static char __test ( + typename __is_destructible_apply().~_Tp1())>::type + ); template static __two __test (...); static const bool value = sizeof(__test<_Tp>(12)) == sizeof(char); - }; +}; template struct __destructible_imp;