From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-00641c01.pphosted.com (mx0b-00641c01.pphosted.com [205.220.177.146]) by sourceware.org (Postfix) with ESMTPS id D76E6385841E; Thu, 14 Mar 2024 07:28:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D76E6385841E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=gcc.gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D76E6385841E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=205.220.177.146 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710401284; cv=none; b=ve4FA0myX6CUv92IOz9Ny3jzXdoC9say2HPtKHxgktYP2XbBFGNoCS8OPgZxy41v61qBD1iZBOAfDU7JR4jTJIrFlM5xJgaUaIWTDVj2Wv6pqfE0Y1w4B7qvufiQDZwKZLZHBa1L/6WOJQ3d91M3EF+aYB88/Vb6kXTljwWc5Mk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710401284; c=relaxed/simple; bh=kcTseQhJg1VmJgN5hwD1m0TlN4unq3ykuejurkDQ12k=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=IF8toEhtxlwDQul7C0w2jxOb1P8sMNhRu6ykT0ZwJw97Q/rhxii0xjPc0I9qVKe2c+wRDouRQdOccUW8N9QnKMRbQpAMx+JUjExE6Oit5xvykh2umPJeTuiPFATTDlOWJOOGtiDJJLmhezleMWbD/vRaVJ96vMZn+7IWy34N8uQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0247477.ppops.net [127.0.0.1]) by mx0a-00641c01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42E7Rgvt030443; Thu, 14 Mar 2024 07:28:02 GMT Received: from mxout21.s.uw.edu (mxout21.s.uw.edu [140.142.32.139]) by mx0a-00641c01.pphosted.com (PPS) with ESMTPS id 3wun202798-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Mar 2024 07:28:02 +0000 Received: from smtp.washington.edu (smtp.washington.edu [128.208.60.132]) by mxout21.s.uw.edu (8.14.4+UW20.07/8.14.4+UW24.02) with ESMTP id 42E7Rxkn027830 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Mar 2024 00:27:59 -0700 X-Auth-Received: from kmatsui-ThinkPad-X1-Carbon-Gen-9.dhcp4.washington.edu ([10.154.74.128]) (authenticated authid=kmatsui) by smtp.washington.edu (8.16.1+UW21.10/8.14.4+UW24.02) with ESMTPSA id 42E7RwdR007374 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Mar 2024 00:27:59 -0700 X-UW-Orig-Sender: kmatsui@smtp.washington.edu From: Ken Matsui To: gcc-patches@gcc.gnu.org Cc: jason@redhat.com, ppalka@redhat.com, Ken Matsui Subject: [PATCH v2 12/12] extend.texi: Add subsections for type- and expression-yielding traits Date: Thu, 14 Mar 2024 00:22:35 -0700 Message-ID: <20240314072234.880769-13-kmatsui@gcc.gnu.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240302002229.308001-1-kmatsui@gcc.gnu.org> References: <20240302002229.308001-1-kmatsui@gcc.gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-GUID: 4E-TY8WT-eNLuFU6yADtsaRdIlF8HpLf X-Proofpoint-ORIG-GUID: 4E-TY8WT-eNLuFU6yADtsaRdIlF8HpLf x-header: uw-relay-non-domains X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-14_04,2024-03-13_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 mlxlogscore=999 adultscore=0 suspectscore=0 phishscore=0 impostorscore=0 malwarescore=0 spamscore=0 mlxscore=0 priorityscore=1501 lowpriorityscore=0 clxscore=1034 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2403140047 X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NEUTRAL,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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 --- gcc/doc/extend.texi | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) 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 -- 2.44.0