[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
Wed Nov 15 15:04:40 PST 2023


================
@@ -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;
----------------
ldionne wrote:

I think what Nikolas tried explaining is that in most cases, we already call the builtin directly from the `_v` alias if there's a builtin (for example `libcxx/include/__type_traits/is_reference.h`). So I think there should be no other places where we want to make the same change, unless of course we forgot to do it in other places.

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


More information about the libcxx-commits mailing list