[libcxx-commits] [libcxx] [libcxx] removes unnecessary traits from `has_unique_object_representations` (PR #69241)

Christopher Di Bella via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 16 12:37:43 PDT 2023


https://github.com/cjdb created https://github.com/llvm/llvm-project/pull/69241

`remove_cv_t` and `remove_all_extents_t` are taken care of by the built-in trait, so we don't need to use them directly.

>From f4c8aba154a112b78c296e027c15793a651bdb17 Mon Sep 17 00:00:00 2001
From: Christopher Di Bella <cjdb at google.com>
Date: Mon, 16 Oct 2023 19:33:30 +0000
Subject: [PATCH] [libcxx] removes unnecessary traits from
 `has_unique_object_representations`

`remove_cv_t` and `remove_all_extents_t` are taken care of by the
built-in trait, so we don't need to use them directly.
---
 .../include/__type_traits/has_unique_object_representation.h  | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libcxx/include/__type_traits/has_unique_object_representation.h b/libcxx/include/__type_traits/has_unique_object_representation.h
index c0ada5618f0e3ed..0e90193df9d4348 100644
--- a/libcxx/include/__type_traits/has_unique_object_representation.h
+++ b/libcxx/include/__type_traits/has_unique_object_representation.h
@@ -11,8 +11,6 @@
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
-#include <__type_traits/remove_all_extents.h>
-#include <__type_traits/remove_cv.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
@@ -24,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
 struct _LIBCPP_TEMPLATE_VIS has_unique_object_representations
-    : public integral_constant<bool, __has_unique_object_representations(remove_cv_t<remove_all_extents_t<_Tp>>)> {};
+    : public integral_constant<bool, __has_unique_object_representations(_Tp)> {};
 
 template <class _Tp>
 inline constexpr bool has_unique_object_representations_v = has_unique_object_representations<_Tp>::value;



More information about the libcxx-commits mailing list