From nobody Wed Oct 23 18:30:37 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XYczy1yVpz5ZWXK; Wed, 23 Oct 2024 18:30:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XYczx74w1z3wYC; Wed, 23 Oct 2024 18:30:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729708238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c08ShXYA2TOWuGETrT5HFkpcAIgr9xYpqgpHtHxMZm0=; b=fqy+tRqmBfvqyvoVbNKigCWsZM9f45UM+4Gxz5lvLFyezETG4I+vsm56DBAHxIAlGoWXnd K8SqssNnuygKXYM7Eco7UHxszA0yHxEPxLmfYAnicEbYqtmD0M3OlANe3gNrA1YhkjLBYg M/R3Z+tI8nD+6UhDgaGmYBqC4ZC3FyU1O+9wsXiOas0bi8kYdynrCfkQ0RmH4x8W8DdB/s FdVW4hi7xs8BGWTC/sNtsO0JOEvpUncH+k84LSxbb9Yuty03/8J+xi/gXLlaJ7u8CfuEWO iwJ0hNC2QZKzOhueurZ6L9Af6dz6u9xsvwaLX8xouf6tlvxwRTPLqubl8CHoCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729708238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c08ShXYA2TOWuGETrT5HFkpcAIgr9xYpqgpHtHxMZm0=; b=qEgFwwlf5Zf4NLmwqAUReblZ8J4Whc/kSHYUP7vkxv4ESizFVsg+XKVUgQGQGncq3rBMyo nlGqqTjcjVCb9mP43455MJ67XlpsDDl/AP+ndsoOooviMhRdQcnpQxaVcEZ/POXSZDP0vS bbO69TO+K00HF5/F8Ma5i+EC3D00uWQxdeqEj2aUdpyeF3ke85HMHq+xwczp77i2+Rrlwm 25I3I5yCLGcXdABU7/Ye05Q8LIXoDh6iAfy98S9M68KY/vUEq6jJOw+w+gL51DEdEQMGET /1BI9N/YDYTetz9ftYTyMrVwX/bRM4Xi9US2E4Tt4Cuscsqo017umYXz5KYAIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729708238; a=rsa-sha256; cv=none; b=N5SkpG0M7reJ7KVaIDlL3A+xxRgjXSLX2sPPC1OsJbljnVgtVtcux+XcncYVpcC2dHAJJC jLKN/ZRQpboYnagqhoDIH+Q0I0lkmy/xY/yHRdMvJoSTAC0sULgRCrOoIt2ccrGslHlEvJ LGiSLh7/3imJQvSnAYMQRL4qZX/uC8OrAhKlIhs1JvNjQwPYjFRaHFsuQtHWHXU3Lo5bhw td5nMVsUMmWaR69QspsD+CQHW0o8OP8RflH/cy5HQP6Bb3F37Jmhyz+bKRMe1PjO1wOkEW takROySAzzwBEtMZIHTfBhiPvQoWW/ynTdzhYIFyJeS4NHu4b3JPI8794e2JRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XYczx5vmJz17yQ; Wed, 23 Oct 2024 18:30:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49NIUb8U069351; Wed, 23 Oct 2024 18:30:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49NIUbj2069348; Wed, 23 Oct 2024 18:30:37 GMT (envelope-from git) Date: Wed, 23 Oct 2024 18:30:37 GMT Message-Id: <202410231830.49NIUbj2069348@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 0bec0529b1d7 - main - libcxx-compat: revert llvmorg-19-init-17728-g30cc12cd818d: List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0bec0529b1d704f391ec499c39744f521e646a6d Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=0bec0529b1d704f391ec499c39744f521e646a6d commit 0bec0529b1d704f391ec499c39744f521e646a6d Author: Dimitry Andric AuthorDate: 2024-08-05 20:17:59 +0000 Commit: Dimitry Andric CommitDate: 2024-10-23 18:26:42 +0000 libcxx-compat: revert llvmorg-19-init-17728-g30cc12cd818d: [libc++] Simplify the implementation of is_null_pointer a bit (#98728) PR: 280562 MFC after: 1 month --- .../libcxx/include/__type_traits/is_fundamental.h | 2 +- .../libcxx/include/__type_traits/is_null_pointer.h | 12 +++++++++--- .../llvm-project/libcxx/include/__type_traits/is_scalar.h | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_fundamental.h b/contrib/llvm-project/libcxx/include/__type_traits/is_fundamental.h index 55f8e41f75f4..57206e0d9deb 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_fundamental.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_fundamental.h @@ -34,7 +34,7 @@ inline constexpr bool is_fundamental_v = __is_fundamental(_Tp); template struct _LIBCPP_TEMPLATE_VIS is_fundamental - : public integral_constant::value || __is_null_pointer_v<_Tp> || is_arithmetic<_Tp>::value> {}; + : public integral_constant::value || __is_nullptr_t<_Tp>::value || is_arithmetic<_Tp>::value> {}; # if _LIBCPP_STD_VER >= 17 template diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_null_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/is_null_pointer.h index 9f5697e23268..c666f5f24759 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_null_pointer.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_null_pointer.h @@ -11,6 +11,7 @@ #include <__config> #include <__type_traits/integral_constant.h> +#include <__type_traits/remove_cv.h> #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) @@ -20,15 +21,20 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -inline const bool __is_null_pointer_v = __is_same(__remove_cv(_Tp), nullptr_t); +struct __is_nullptr_t_impl : public false_type {}; +template <> +struct __is_nullptr_t_impl : public true_type {}; + +template +struct _LIBCPP_TEMPLATE_VIS __is_nullptr_t : public __is_nullptr_t_impl<__remove_cv_t<_Tp> > {}; #if _LIBCPP_STD_VER >= 14 template -struct _LIBCPP_TEMPLATE_VIS is_null_pointer : integral_constant> {}; +struct _LIBCPP_TEMPLATE_VIS is_null_pointer : public __is_nullptr_t_impl<__remove_cv_t<_Tp> > {}; # if _LIBCPP_STD_VER >= 17 template -inline constexpr bool is_null_pointer_v = __is_null_pointer_v<_Tp>; +inline constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value; # endif #endif // _LIBCPP_STD_VER >= 14 diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_scalar.h b/contrib/llvm-project/libcxx/include/__type_traits/is_scalar.h index 455200de4720..15f1c71554f2 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_scalar.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_scalar.h @@ -49,7 +49,7 @@ struct _LIBCPP_TEMPLATE_VIS is_scalar bool, is_arithmetic<_Tp>::value || is_member_pointer<_Tp>::value || is_pointer<_Tp>::value || - __is_null_pointer_v<_Tp> || + __is_nullptr_t<_Tp>::value || __is_block<_Tp>::value || is_enum<_Tp>::value> {}; // clang-format on