[PATCH] [libcxx] Remove use of default function template parameters in type traits. Fixes DR20484
Marshall Clow
mclow.lists at gmail.com
Thu Jul 31 07:13:52 PDT 2014
I tested this in C++03/11/14 modes. All tests passed in 11/14, but the is_destructible tests failed in C++03 mode (as they did before this change), due to the fact that __typeof__ is not really a replacement for declval.
This looks OK to me.
================
Comment at: include/type_traits:1554
@@ +1553,3 @@
+ static char __test (
+ typename __is_destructible_apply<decltype(_VSTD::declval<_Tp1&>().~_Tp1())>::type
+ );
----------------
Agustín Bergé wrote:
> Isn't the `decltype` still a problem if it has to compile in C++03 mode?
Yes. It will fail (cause a compilation failure) when the destructor is private or protected.
http://reviews.llvm.org/D4735
More information about the cfe-commits
mailing list