From nobody Sun Dec 01 12:54:12 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 4Y1Rgm5HL7z5fb5S; Sun, 01 Dec 2024 12:54:12 +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 4Y1Rgm2TkLz4PB8; Sun, 1 Dec 2024 12:54:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057652; 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=p2K6hJwzZ9CaNzicEFjBanHpVvx5SjBWAdNwDBjZZf8=; b=QgV8HJhrePvJR2rLnonBGcDQGeuq/pzD8sSnC6A8neu7KwW6nRLoL/FdATS9AmeeYr/fdp H3pxNXJSp64BBcV/Nw8G7CCCEu2t8hYE5/X911zNrPvpFeNhak2n5Uk1WJb8ND3ll3VrRu 6+7yYwrfHktl9m65p0EbP61LR3hPmiJdvC4UcmAtPZ42x/lk20tJAOuBjztmxehy3UGrMr m/O4y5unr3FKZfBIYWylr2GyJTl2++N4Uzd6BOONuCYbhtZgD2L7CheflY6Bl6mUpmN8KK SkA95+Ngl+3KgdOMhSZj0by53Gi4iiAU/g6ye4MvF6PWb2NwhKjan7Av2cSjhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733057652; 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=p2K6hJwzZ9CaNzicEFjBanHpVvx5SjBWAdNwDBjZZf8=; b=mLDQ+47Ye53jCaFAqAqZY4lb2R4eS2WOQ1ipuWVha5QSbNuYQI4QSft9hxpOCNoVki5pGl mFff3J8MqUIoYLRZwpCEnf8hsPDSNfSzvGxw/GNYBMP31Vyy0TSwWYuvvmo7teZlC/J6nh HwdyZdHO3lSDn63G69mPql+fdzPiQYkbqzSz3msZ7w7FNzyDXgH/5lkKFkyysle9BwwG5o 720lUt9tEIUx0SQ5toN1AMYliZvTtWaxstWicebuTn/DZt25On4t7j13RHoqvlTByiALJN +goVSu/ijzFPsKEceMUrzz+CNmhy8HEfT8dI2Vih9np/SkGl571uvKbQoIQ5KA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733057652; a=rsa-sha256; cv=none; b=kyS2yMB82muNHvcJop3FtplAjhH4C5+W6IJQIQMlA9+GDuxNWm2h60KxJeJ5WKa3TFIP+t gFmyDL6uss7P/K7wodiWi5pXqJHalBg7tapbxB1j8dxn2rXq1a/OGFwadNCIVhjHO0D/tQ yN+CGjWSSiJCXQNWnk5QnzIkXKIgmOI4BRi1y0qBoHSHRus69XncbxkeBdem5hLahkxpIh f8WXFPirGetNu81JcznIjC7gCGH4oN7Og9Pib2bw33YU4phx+hA5ZAgk8oqPYa1/B7rsR9 FfjT1tc9XLjXVLNUjPkofD0aosVH/kbKfcHZ1Y4tocRntxo1teHoiXj+qPdMkg== 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 4Y1Rgm1YLGztQ8; Sun, 1 Dec 2024 12:54:12 +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 4B1CsCu2093721; Sun, 1 Dec 2024 12:54:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B1CsCiv093718; Sun, 1 Dec 2024 12:54:12 GMT (envelope-from git) Date: Sun, 1 Dec 2024 12:54:12 GMT Message-Id: <202412011254.4B1CsCiv093718@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: a8c253ec6520 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: a8c253ec65209bdab2bde9205026d711ce1497bc Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=a8c253ec65209bdab2bde9205026d711ce1497bc commit a8c253ec65209bdab2bde9205026d711ce1497bc Author: Dimitry Andric AuthorDate: 2024-08-05 20:17:59 +0000 Commit: Dimitry Andric CommitDate: 2024-12-01 12:32:39 +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