re PR other/48748 (Undocumented type traits used in libstdc++-4.6)

2011-04-24  Paolo Carlini  <paolo.carlini@oracle.com>

	PR other/48748
	* doc/extend.texi (Type Traits): Document __is_standard_layout,
	__is_literal_type, and __is_trivial; update throughout about
	possibly cv-qualified void types.

From-SVN: r172911
This commit is contained in:
Paolo Carlini 2011-04-24 09:42:16 +00:00 committed by Paolo Carlini
parent bebd5f993c
commit 5307cbaa75
2 changed files with 43 additions and 21 deletions

View File

@ -1,3 +1,10 @@
2011-04-24 Paolo Carlini <paolo.carlini@oracle.com>
PR other/48748
* doc/extend.texi (Type Traits): Document __is_standard_layout,
__is_literal_type, and __is_trivial; update throughout about
possibly cv-qualified void types.
2011-04-24 Gerald Pfeifer <gerald@pfeifer.com> 2011-04-24 Gerald Pfeifer <gerald@pfeifer.com>
* doc/sourcebuild.texi (Ada Tests): Adjust reference to ACATS * doc/sourcebuild.texi (Ada Tests): Adjust reference to ACATS

View File

@ -14305,63 +14305,63 @@ If @code{type} is const qualified or is a reference type then the trait is
false. Otherwise if @code{__has_trivial_assign (type)} is true then the trait false. Otherwise if @code{__has_trivial_assign (type)} is true then the trait
is true, else if @code{type} is a cv class or union type with copy assignment is true, else if @code{type} is a cv class or union type with copy assignment
operators that are known not to throw an exception then the trait is true, operators that are known not to throw an exception then the trait is true,
else it is false. Requires: @code{type} shall be a complete type, an array else it is false. Requires: @code{type} shall be a complete type,
type of unknown bound, or is a @code{void} type. (possibly cv-qualified) @code{void}, or an array of unknown bound.
@item __has_nothrow_copy (type) @item __has_nothrow_copy (type)
If @code{__has_trivial_copy (type)} is true then the trait is true, else if If @code{__has_trivial_copy (type)} is true then the trait is true, else if
@code{type} is a cv class or union type with copy constructors that @code{type} is a cv class or union type with copy constructors that
are known not to throw an exception then the trait is true, else it is false. are known not to throw an exception then the trait is true, else it is false.
Requires: @code{type} shall be a complete type, an array type of Requires: @code{type} shall be a complete type, (possibly cv-qualified)
unknown bound, or is a @code{void} type. @code{void}, or an array of unknown bound.
@item __has_nothrow_constructor (type) @item __has_nothrow_constructor (type)
If @code{__has_trivial_constructor (type)} is true then the trait is If @code{__has_trivial_constructor (type)} is true then the trait is
true, else if @code{type} is a cv class or union type (or array true, else if @code{type} is a cv class or union type (or array
thereof) with a default constructor that is known not to throw an thereof) with a default constructor that is known not to throw an
exception then the trait is true, else it is false. Requires: exception then the trait is true, else it is false. Requires:
@code{type} shall be a complete type, an array type of unknown bound, @code{type} shall be a complete type, (possibly cv-qualified)
or is a @code{void} type. @code{void}, or an array of unknown bound.
@item __has_trivial_assign (type) @item __has_trivial_assign (type)
If @code{type} is const qualified or is a reference type then the trait is If @code{type} is const qualified or is a reference type then the trait is
false. Otherwise if @code{__is_pod (type)} is true then the trait is false. Otherwise if @code{__is_pod (type)} is true then the trait is
true, else if @code{type} is a cv class or union type with a trivial true, else if @code{type} is a cv class or union type with a trivial
copy assignment ([class.copy]) then the trait is true, else it is copy assignment ([class.copy]) then the trait is true, else it is
false. Requires: @code{type} shall be a complete type, an array type false. Requires: @code{type} shall be a complete type, (possibly
of unknown bound, or is a @code{void} type. cv-qualified) @code{void}, or an array of unknown bound.
@item __has_trivial_copy (type) @item __has_trivial_copy (type)
If @code{__is_pod (type)} is true or @code{type} is a reference type If @code{__is_pod (type)} is true or @code{type} is a reference type
then the trait is true, else if @code{type} is a cv class or union type then the trait is true, else if @code{type} is a cv class or union type
with a trivial copy constructor ([class.copy]) then the trait with a trivial copy constructor ([class.copy]) then the trait
is true, else it is false. Requires: @code{type} shall be a complete is true, else it is false. Requires: @code{type} shall be a complete
type, an array type of unknown bound, or is a @code{void} type. type, (possibly cv-qualified) @code{void}, or an array of unknown bound.
@item __has_trivial_constructor (type) @item __has_trivial_constructor (type)
If @code{__is_pod (type)} is true then the trait is true, else if If @code{__is_pod (type)} is true then the trait is true, else if
@code{type} is a cv class or union type (or array thereof) with a @code{type} is a cv class or union type (or array thereof) with a
trivial default constructor ([class.ctor]) then the trait is true, trivial default constructor ([class.ctor]) then the trait is true,
else it is false. Requires: @code{type} shall be a complete type, an else it is false. Requires: @code{type} shall be a complete
array type of unknown bound, or is a @code{void} type. type, (possibly cv-qualified) @code{void}, or an array of unknown bound.
@item __has_trivial_destructor (type) @item __has_trivial_destructor (type)
If @code{__is_pod (type)} is true or @code{type} is a reference type then If @code{__is_pod (type)} is true or @code{type} is a reference type then
the trait is true, else if @code{type} is a cv class or union type (or the trait is true, else if @code{type} is a cv class or union type (or
array thereof) with a trivial destructor ([class.dtor]) then the trait array thereof) with a trivial destructor ([class.dtor]) then the trait
is true, else it is false. Requires: @code{type} shall be a complete is true, else it is false. Requires: @code{type} shall be a complete
type, an array type of unknown bound, or is a @code{void} type. type, (possibly cv-qualified) @code{void}, or an array of unknown bound.
@item __has_virtual_destructor (type) @item __has_virtual_destructor (type)
If @code{type} is a class type with a virtual destructor If @code{type} is a class type with a virtual destructor
([class.dtor]) then the trait is true, else it is false. Requires: ([class.dtor]) then the trait is true, else it is false. Requires:
@code{type} shall be a complete type, an array type of unknown bound, @code{type} shall be a complete type, (possibly cv-qualified)
or is a @code{void} type. @code{void}, or an array of unknown bound.
@item __is_abstract (type) @item __is_abstract (type)
If @code{type} is an abstract class ([class.abstract]) then the trait If @code{type} is an abstract class ([class.abstract]) then the trait
is true, else it is false. Requires: @code{type} shall be a complete is true, else it is false. Requires: @code{type} shall be a complete
type, an array type of unknown bound, or is a @code{void} type. type, (possibly cv-qualified) @code{void}, or an array of unknown bound.
@item __is_base_of (base_type, derived_type) @item __is_base_of (base_type, derived_type)
If @code{base_type} is a base class of @code{derived_type} If @code{base_type} is a base class of @code{derived_type}
@ -14386,22 +14386,37 @@ any, are bit-fields of length 0, and @code{type} has no virtual
members, and @code{type} has no virtual base classes, and @code{type} members, and @code{type} has no virtual base classes, and @code{type}
has no base classes @code{base_type} for which has no base classes @code{base_type} for which
@code{__is_empty (base_type)} is false. Requires: @code{type} shall @code{__is_empty (base_type)} is false. Requires: @code{type} shall
be a complete type, an array type of unknown bound, or is a be a complete type, (possibly cv-qualified) @code{void}, or an array
@code{void} type. of unknown bound.
@item __is_enum (type) @item __is_enum (type)
If @code{type} is a cv enumeration type ([basic.compound]) the trait is If @code{type} is a cv enumeration type ([basic.compound]) the trait is
true, else it is false. true, else it is false.
@item __is_literal_type (type)
If @code{type} is a literal type ([basic.types]) the trait is
true, else it is false. Requires: @code{type} shall be a complete type,
(possibly cv-qualified) @code{void}, or an array of unknown bound.
@item __is_pod (type) @item __is_pod (type)
If @code{type} is a cv POD type ([basic.types]) then the trait is true, If @code{type} is a cv POD type ([basic.types]) then the trait is true,
else it is false. Requires: @code{type} shall be a complete type, else it is false. Requires: @code{type} shall be a complete type,
an array type of unknown bound, or is a @code{void} type. (possibly cv-qualified) @code{void}, or an array of unknown bound.
@item __is_polymorphic (type) @item __is_polymorphic (type)
If @code{type} is a polymorphic class ([class.virtual]) then the trait If @code{type} is a polymorphic class ([class.virtual]) then the trait
is true, else it is false. Requires: @code{type} shall be a complete is true, else it is false. Requires: @code{type} shall be a complete
type, an array type of unknown bound, or is a @code{void} type. type, (possibly cv-qualified) @code{void}, or an array of unknown bound.
@item __is_standard_layout (type)
If @code{type} is a standard-layout type ([basic.types]) the trait is
true, else it is false. Requires: @code{type} shall be a complete
type, (possibly cv-qualified) @code{void}, or an array of unknown bound.
@item __is_trivial (type)
If @code{type} is a trivial type ([basic.types]) the trait is
true, else it is false. Requires: @code{type} shall be a complete
type, (possibly cv-qualified) @code{void}, or an array of unknown bound.
@item __is_union (type) @item __is_union (type)
If @code{type} is a cv union type ([basic.compound]) the trait is If @code{type} is a cv union type ([basic.compound]) the trait is