Skip to content

Commit e51099a

Browse files
committed
Apply review comment
1 parent ea5e61e commit e51099a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

libcxx/include/__type_traits/has_unique_object_representation.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD
2323

2424
template <class _Tp>
2525
struct _LIBCPP_TEMPLATE_VIS has_unique_object_representations
26-
// TODO: We work around a Clang bug in __has_unique_object_representations by instantiating the
27-
// builtin on the non-array type first and discarding that. This is issue #95311.
28-
// This workaround can be removed once the bug has been fixed in all supported Clangs.
29-
: public integral_constant<bool,
30-
((void)__has_unique_object_representations(remove_all_extents_t<_Tp>),
31-
__has_unique_object_representations(_Tp))> {};
26+
// TODO: We work around a Clang and GCC bug in __has_unique_object_representations by using remove_all_extents
27+
// even though it should not be necessary. This was reported to the compilers:
28+
// - Clang: https://github.com/llvm/llvm-project/issues/95311
29+
// - GCC: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115476
30+
// remove_all_extents_t can be removed once all the compilers we support have fixed this bug.
31+
: public integral_constant<bool, __has_unique_object_representations(remove_all_extents_t<_Tp>)> {};
3232

3333
template <class _Tp>
3434
inline constexpr bool has_unique_object_representations_v = __has_unique_object_representations(_Tp);

0 commit comments

Comments
 (0)