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

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Apr 12 06:49:38 PDT 2024


https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/69241

>From b0ce3386338052558272dcfe03bc0aaf800317e1 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 c0ada5618f0e3e..0e90193df9d434 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