diff mbox series

[v2,12/12] extend.texi: Add subsections for type- and expression-yielding traits

Message ID 20240314072234.880769-13-kmatsui@gcc.gnu.org
State New
Headers show
Series [01/11] gcc/doc/extend.texi: Sort built-in traits alphabetically | expand

Commit Message

Ken Matsui March 14, 2024, 7:22 a.m. UTC
gcc/ChangeLog:

	* doc/extend.texi (Expression-yielding Type Traits): New
	subsection.
	(Type-yielding Type Traits): Likewise.
	(__remove_pointer): Move under the Type-yielding Type Traits
	subsection.

Signed-off-by: Ken Matsui <kmatsui@gcc.gnu.org>
---
 gcc/doc/extend.texi | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 10ddf50182d..5d0afbe9611 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -29488,6 +29488,11 @@  compile-time determination of
 various characteristics of a type (or of a
 pair of types).
 
+@subsection Expression-yielding Type Traits
+
+These built-in traits yield an expression of type @code{bool}
+or @code{size_t}.
+
 @defbuiltin{bool __has_nothrow_assign (@var{type})}
 If @var{type} is @code{const}-qualified or is a reference type then
 the trait is @code{false}.  Otherwise if @code{__has_trivial_assign (type)}
@@ -29716,16 +29721,19 @@  If @var{type} is a cv union type ([basic.compound]) the trait is
 @code{true}, else it is @code{false}.
 @enddefbuiltin
 
-@defbuiltin{@var{type} __remove_pointer (@var{ptr_type})}
-If @var{ptr_type} is a pointer type ([dcl.ptr]) then the trait is the
-@var{type} pointed to by @var{ptr_type}, else it is @var{ptr_type}.
-@enddefbuiltin
-
 @defbuiltin{bool __underlying_type (@var{type})}
 The underlying type of @var{type}.
 Requires: @var{type} shall be an enumeration type ([dcl.enum]).
 @enddefbuiltin
 
+@subsection Type-yielding Type Traits
+
+These built-in traits yield a type.
+
+@defbuiltin{@var{type} __remove_pointer (@var{ptr_type})}
+If @var{ptr_type} is a pointer type ([dcl.ptr]) then the trait is the
+@var{type} pointed to by @var{ptr_type}, else it is @var{ptr_type}.
+@enddefbuiltin
 
 @node C++ Concepts
 @section C++ Concepts