From nobody Sun Dec 01 11:18:39 2024 X-Original-To: dev-commits-src-all@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 4Y1PYX32dgz5fT69; Sun, 01 Dec 2024 11:18:40 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1PYX1LhTz42kP; Sun, 1 Dec 2024 11:18:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051920; 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=NCZhBbw38+bTJs+ulqkTLe0+TejpPTl0Nqg1tN4gr+4=; b=qGdyYWW/eZYj95aU2oOmjj5ctHNmEKN41g2/hJFZ84aMmTe4/soVSoB4yWlbN59ngipBwp FVjNN9rzbrJj14swA8NLgAexp9TiOq3ZeIMN8f3+ezjgiY2Os9qLsogkn7IVlVBfuTAC0h zFnBq+NcKQ4uI2aKj7/iTndCI/ml3iDflnl6Ae9cg+K7U7N4+WBoUTGuXdSgFwhfhze6LS TU5TnjyW8EIgQGmYavIEjOhvBBIUNodhqrnJlwwxQPM+1h1oSjqi+eI+4A5SVrre1PahNA i7JfX05BNa5Ppj8Rnpa8GvPhBxbr/ixVsFqfchczc8XONF7YZCyd/ZYSpc/j3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733051920; 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=NCZhBbw38+bTJs+ulqkTLe0+TejpPTl0Nqg1tN4gr+4=; b=mQQFZV0O+iW8VCx5COf2mx1pfCRNWzKslOCur2FvC8zAsb3pNXn87no3VeHzb0CuJFdx7i puyqn8eNDtNcCZBHUwtbBDx4Mq4KJf+7UPIm+S1kn2A0xWB9tVL9rl3xWO0BOdB3siYTtc p17k0+LJecPNeDzI4NHu8ZscqkgJdU56JWi25TNk+DbCptXuCyr4UUbS7QAuV486EeO4fq kyIX3o6Q+reyYAucAyHG61q9U2Hf5JVq3Q8YB3NgVHmnWlaIzKv0AXMrqsqKJVj4RnXCUv 3/uB+ZPXSJiPWiwQW0UnWgwesjWI1vfw9yY3NWmWDhqKfGVHcyrtRIN1sVOIdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733051920; a=rsa-sha256; cv=none; b=R0LAkJcIYJWETHd6Dhzn8w9+JYUjUw2iVPZMhIoCn6oAF63+ZzPsLkkHudbGjAxOwM85o0 5YznoCfgW51+lSnlPeiaQbFh27emdp135FDKOanh5D9QX4ayDUILPnmdjX3+FWgt09fEmN oGZfERuEmWAtut+NAMlBtuChcJno1e+Y6AAmU8WI4x2zAQ8VDcnBEKV73Bi2w8AcsmiSsG lqhm3UO5hNy06jSJdgi8ZE9iBy+YmXy/uQMOB/RPesO8uq8oSn6xxtBT3FM5wpLpO0fHFJ MoXS5ADPFYaFYHr1asIJ/0Lt5ZTl3u4kyNm0KxyTzG4Mai9gFpeGLsTpiNaFyA== 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 4Y1PYX0RKtzr0P; Sun, 1 Dec 2024 11:18:40 +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 4B1BIeLY008109; Sun, 1 Dec 2024 11:18:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1BIdsi008106; Sun, 1 Dec 2024 11:18:39 GMT (envelope-from git) Date: Sun, 1 Dec 2024 11:18:39 GMT Message-Id: <202412011118.4B1BIdsi008106@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 26b3990480bd - stable/14 - libcxx-compat: revert llvmorg-19-init-17728-g30cc12cd818d: List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 26b3990480bdc602af856abdde139713a0ee1873 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=26b3990480bdc602af856abdde139713a0ee1873 commit 26b3990480bdc602af856abdde139713a0ee1873 Author: Dimitry Andric AuthorDate: 2024-08-05 20:17:59 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 11:17:09 +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 (cherry picked from commit 0bec0529b1d704f391ec499c39744f521e646a6d) --- .../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