1 Upstream-Status: Inappropriate [Backport]
2 From 63c4ffd33d8f3e61e53d30f50146e1bc4cb6e38a Mon Sep 17 00:00:00 2001
3 From: paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
4 Date: Sun, 24 Apr 2011 09:43:29 +0000
5 Subject: [PATCH 176/200] 2011-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8 * doc/extend.texi (Type Traits): Document __is_standard_layout,
9 __is_literal_type, and __is_trivial; update throughout about
10 possibly cv-qualified void types.
13 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@172912 138bc75d-0d04-0410-961f-82ee72b054a4
15 index 998d703..c771436 100644
16 --- a/gcc/doc/extend.texi
17 +++ b/gcc/doc/extend.texi
18 @@ -14266,63 +14266,63 @@ If @code{type} is const qualified or is a reference type then the trait is
19 false. Otherwise if @code{__has_trivial_assign (type)} is true then the trait
20 is true, else if @code{type} is a cv class or union type with copy assignment
21 operators that are known not to throw an exception then the trait is true,
22 -else it is false. Requires: @code{type} shall be a complete type, an array
23 -type of unknown bound, or is a @code{void} type.
24 +else it is false. Requires: @code{type} shall be a complete type,
25 +(possibly cv-qualified) @code{void}, or an array of unknown bound.
27 @item __has_nothrow_copy (type)
28 If @code{__has_trivial_copy (type)} is true then the trait is true, else if
29 @code{type} is a cv class or union type with copy constructors that
30 are known not to throw an exception then the trait is true, else it is false.
31 -Requires: @code{type} shall be a complete type, an array type of
32 -unknown bound, or is a @code{void} type.
33 +Requires: @code{type} shall be a complete type, (possibly cv-qualified)
34 +@code{void}, or an array of unknown bound.
36 @item __has_nothrow_constructor (type)
37 If @code{__has_trivial_constructor (type)} is true then the trait is
38 true, else if @code{type} is a cv class or union type (or array
39 thereof) with a default constructor that is known not to throw an
40 -exception then the trait is true, else it is false. Requires:
41 -@code{type} shall be a complete type, an array type of unknown bound,
42 -or is a @code{void} type.
43 +exception then the trait is true, else it is false. Requires:
44 +@code{type} shall be a complete type, (possibly cv-qualified)
45 +@code{void}, or an array of unknown bound.
47 @item __has_trivial_assign (type)
48 If @code{type} is const qualified or is a reference type then the trait is
49 false. Otherwise if @code{__is_pod (type)} is true then the trait is
50 true, else if @code{type} is a cv class or union type with a trivial
51 copy assignment ([class.copy]) then the trait is true, else it is
52 -false. Requires: @code{type} shall be a complete type, an array type
53 -of unknown bound, or is a @code{void} type.
54 +false. Requires: @code{type} shall be a complete type, (possibly
55 +cv-qualified) @code{void}, or an array of unknown bound.
57 @item __has_trivial_copy (type)
58 If @code{__is_pod (type)} is true or @code{type} is a reference type
59 then the trait is true, else if @code{type} is a cv class or union type
60 with a trivial copy constructor ([class.copy]) then the trait
61 is true, else it is false. Requires: @code{type} shall be a complete
62 -type, an array type of unknown bound, or is a @code{void} type.
63 +type, (possibly cv-qualified) @code{void}, or an array of unknown bound.
65 @item __has_trivial_constructor (type)
66 If @code{__is_pod (type)} is true then the trait is true, else if
67 @code{type} is a cv class or union type (or array thereof) with a
68 trivial default constructor ([class.ctor]) then the trait is true,
69 -else it is false. Requires: @code{type} shall be a complete type, an
70 -array type of unknown bound, or is a @code{void} type.
71 +else it is false. Requires: @code{type} shall be a complete
72 +type, (possibly cv-qualified) @code{void}, or an array of unknown bound.
74 @item __has_trivial_destructor (type)
75 If @code{__is_pod (type)} is true or @code{type} is a reference type then
76 the trait is true, else if @code{type} is a cv class or union type (or
77 array thereof) with a trivial destructor ([class.dtor]) then the trait
78 is true, else it is false. Requires: @code{type} shall be a complete
79 -type, an array type of unknown bound, or is a @code{void} type.
80 +type, (possibly cv-qualified) @code{void}, or an array of unknown bound.
82 @item __has_virtual_destructor (type)
83 If @code{type} is a class type with a virtual destructor
84 ([class.dtor]) then the trait is true, else it is false. Requires:
85 -@code{type} shall be a complete type, an array type of unknown bound,
86 -or is a @code{void} type.
87 +@code{type} shall be a complete type, (possibly cv-qualified)
88 +@code{void}, or an array of unknown bound.
90 @item __is_abstract (type)
91 If @code{type} is an abstract class ([class.abstract]) then the trait
92 is true, else it is false. Requires: @code{type} shall be a complete
93 -type, an array type of unknown bound, or is a @code{void} type.
94 +type, (possibly cv-qualified) @code{void}, or an array of unknown bound.
96 @item __is_base_of (base_type, derived_type)
97 If @code{base_type} is a base class of @code{derived_type}
98 @@ -14347,22 +14347,37 @@ any, are bit-fields of length 0, and @code{type} has no virtual
99 members, and @code{type} has no virtual base classes, and @code{type}
100 has no base classes @code{base_type} for which
101 @code{__is_empty (base_type)} is false. Requires: @code{type} shall
102 -be a complete type, an array type of unknown bound, or is a
104 +be a complete type, (possibly cv-qualified) @code{void}, or an array
107 @item __is_enum (type)
108 If @code{type} is a cv enumeration type ([basic.compound]) the trait is
109 true, else it is false.
111 +@item __is_literal_type (type)
112 +If @code{type} is a literal type ([basic.types]) the trait is
113 +true, else it is false. Requires: @code{type} shall be a complete type,
114 +(possibly cv-qualified) @code{void}, or an array of unknown bound.
116 @item __is_pod (type)
117 If @code{type} is a cv POD type ([basic.types]) then the trait is true,
118 -else it is false. Requires: @code{type} shall be a complete type,
119 -an array type of unknown bound, or is a @code{void} type.
120 +else it is false. Requires: @code{type} shall be a complete type,
121 +(possibly cv-qualified) @code{void}, or an array of unknown bound.
123 @item __is_polymorphic (type)
124 If @code{type} is a polymorphic class ([class.virtual]) then the trait
125 is true, else it is false. Requires: @code{type} shall be a complete
126 -type, an array type of unknown bound, or is a @code{void} type.
127 +type, (possibly cv-qualified) @code{void}, or an array of unknown bound.
129 +@item __is_standard_layout (type)
130 +If @code{type} is a standard-layout type ([basic.types]) the trait is
131 +true, else it is false. Requires: @code{type} shall be a complete
132 +type, (possibly cv-qualified) @code{void}, or an array of unknown bound.
134 +@item __is_trivial (type)
135 +If @code{type} is a trivial type ([basic.types]) the trait is
136 +true, else it is false. Requires: @code{type} shall be a complete
137 +type, (possibly cv-qualified) @code{void}, or an array of unknown bound.
139 @item __is_union (type)
140 If @code{type} is a cv union type ([basic.compound]) the trait is