[libcxx-commits] [libcxx] [libcxx] removes unnecessary traits from `has_unique_object_representations` (PR #69241)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Oct 16 12:38:59 PDT 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Christopher Di Bella (cjdb)
<details>
<summary>Changes</summary>
`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.
---
Full diff: https://github.com/llvm/llvm-project/pull/69241.diff
1 Files Affected:
- (modified) libcxx/include/__type_traits/has_unique_object_representation.h (+1-3)
``````````diff
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;
``````````
</details>
https://github.com/llvm/llvm-project/pull/69241
More information about the libcxx-commits
mailing list