Hi Argyrios
On 30/09/2014 10:45 p.m., Argyrios Kyrtzidis wrote:
Hi Marshall,
This seems to have caused a regression with Objective-C++, see the following
test case:
#include <type_traits>
class CXXForwardClass;
@class ObjCForwardClass;
static_assert(std::is_trivially_destructible<CXXForwardClass*>::value == true, "it
is true"); // true
static_assert(std::is_trivially_destructible<ObjCForwardClass*>::value == true, "it
is true"); // false ?
This sounds like a pre-existing issue to me. Does the following test
case hold?
static_assert(std::is_destructible<CXXForwardClass*>::value == true,
"it is true"); // true
static_assert(std::is_destructible<ObjCForwardClass*>::value == true,
"it is true"); // false ?
On Sep 2, 2014, at 9:19 AM, Marshall Clow <[email protected]> wrote:
Author: marshall
Date: Tue Sep 2 11:19:38 2014
New Revision: 216909
URL: http://llvm.org/viewvc/llvm-project?rev=216909&view=rev
Log:
Fix PR#20834 - 'is_trivially_destructible yeilds wrong answer for arrays of
unknown bound' Thanks to K-ballo for the bug report. Update a few of the other
tests while we're here, and fix a typo in a test name.
--- libcxx/trunk/include/type_traits (original)
+++ libcxx/trunk/include/type_traits Tue Sep 2 11:19:38 2014
@@ -2861,7 +2861,7 @@ template <class _Tp> struct _LIBCPP_TYPE
#if __has_feature(has_trivial_destructor) || (_GNUC_VER >= 403)
template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_trivially_destructible
- : public integral_constant<bool, __has_trivial_destructor(_Tp)> {};
+ : public integral_constant<bool, is_destructible<_Tp>::value &&
__has_trivial_destructor(_Tp)> {};
This is the relevant change ^. Something that is not destructible cannot
be trivially destructible by definition.
Regards,
--
Agustín K-ballo Bergé.-
http://talesofcpp.fusionfenix.com
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits