This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3] Use __is_pod in tr1::is_pod
- From: Paolo Carlini <pcarlini at suse dot de>
- To: "'gcc-patches at gcc dot gnu dot org'" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 30 Apr 2007 12:31:09 +0200
- Subject: [v3] Use __is_pod in tr1::is_pod
Hi,
tested x86-linux, committed to mainline.
Paolo.
/////////////////
2007-04-30 Paolo Carlini <pcarlini@suse.de>
* include/tr1/type_traits (is_pod): Use __is_pod.
* testsuite/tr1/4_metaprogramming/type_properties/
has_trivial_destructor/has_trivial_destructor.cc: Adjust.
* testsuite/tr1/4_metaprogramming/type_properties/
has_nothrow_constructor/has_nothrow_constructor.cc: Likewise.
* testsuite/tr1/4_metaprogramming/type_properties/
has_trivial_constructor/has_trivial_constructor.cc: Likewise.
* testsuite/tr1/4_metaprogramming/type_properties/
is_pod/is_pod.cc: Likewise.
Index: include/tr1/type_traits
===================================================================
--- include/tr1/type_traits (revision 124281)
+++ include/tr1/type_traits (working copy)
@@ -249,9 +249,7 @@
template<typename _Tp>
struct is_pod
- : public integral_constant<bool, (is_void<_Tp>::value
- || is_scalar<typename
- remove_all_extents<_Tp>::type>::value)>
+ : public integral_constant<bool, __is_pod(_Tp) || is_void<_Tp>::value>
{ };
template<typename _Tp>
Index: testsuite/tr1/4_metaprogramming/type_properties/has_trivial_destructor/has_trivial_destructor.cc
===================================================================
--- testsuite/tr1/4_metaprogramming/type_properties/has_trivial_destructor/has_trivial_destructor.cc (revision 124281)
+++ testsuite/tr1/4_metaprogramming/type_properties/has_trivial_destructor/has_trivial_destructor.cc (working copy)
@@ -1,6 +1,6 @@
// 2004-12-26 Paolo Carlini <pcarlini@suse.de>
//
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -48,9 +48,7 @@
int (ClassType::*[2][3])>(true)) );
VERIFY( (test_category<has_trivial_destructor,
int (ClassType::*[][2][3]) (int)>(true)) );
-
- // Sanity check.
- VERIFY( (test_category<has_trivial_destructor, ClassType>(false)) );
+ VERIFY( (test_category<has_trivial_destructor, ClassType>(true)) );
}
int main()
Index: testsuite/tr1/4_metaprogramming/type_properties/has_nothrow_constructor/has_nothrow_constructor.cc
===================================================================
--- testsuite/tr1/4_metaprogramming/type_properties/has_nothrow_constructor/has_nothrow_constructor.cc (revision 124281)
+++ testsuite/tr1/4_metaprogramming/type_properties/has_nothrow_constructor/has_nothrow_constructor.cc (working copy)
@@ -1,6 +1,6 @@
// 2004-12-29 Paolo Carlini <pcarlini@suse.de>
//
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -48,9 +48,7 @@
int (ClassType::*[2][3])>(true)) );
VERIFY( (test_category<has_nothrow_constructor,
int (ClassType::*[][2][3]) (int)>(true)) );
-
- // Sanity check.
- VERIFY( (test_category<has_nothrow_constructor, ClassType>(false)) );
+ VERIFY( (test_category<has_nothrow_constructor, ClassType>(true)) );
}
int main()
Index: testsuite/tr1/4_metaprogramming/type_properties/has_trivial_constructor/has_trivial_constructor.cc
===================================================================
--- testsuite/tr1/4_metaprogramming/type_properties/has_trivial_constructor/has_trivial_constructor.cc (revision 124281)
+++ testsuite/tr1/4_metaprogramming/type_properties/has_trivial_constructor/has_trivial_constructor.cc (working copy)
@@ -1,6 +1,6 @@
// 2004-12-26 Paolo Carlini <pcarlini@suse.de>
//
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -48,9 +48,7 @@
int (ClassType::*[2][3])>(true)) );
VERIFY( (test_category<has_trivial_constructor,
int (ClassType::*[][2][3]) (int)>(true)) );
-
- // Sanity check.
- VERIFY( (test_category<has_trivial_constructor, ClassType>(false)) );
+ VERIFY( (test_category<has_trivial_constructor, ClassType>(true)) );
}
int main()
Index: testsuite/tr1/4_metaprogramming/type_properties/is_pod/is_pod.cc
===================================================================
--- testsuite/tr1/4_metaprogramming/type_properties/is_pod/is_pod.cc (revision 124281)
+++ testsuite/tr1/4_metaprogramming/type_properties/is_pod/is_pod.cc (working copy)
@@ -1,6 +1,6 @@
// 2004-12-26 Paolo Carlini <pcarlini@suse.de>
//
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -45,9 +45,7 @@
VERIFY( (test_category<is_pod, int(*[][2])(int)>(true)) );
VERIFY( (test_category<is_pod, int (ClassType::*[2][3])>(true)) );
VERIFY( (test_category<is_pod, int (ClassType::*[][2][3]) (int)>(true)) );
-
- // Sanity check.
- VERIFY( (test_category<is_pod, ClassType>(false)) );
+ VERIFY( (test_category<is_pod, ClassType>(true)) );
}
int main()