[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

A. Jiang via cfe-commits cfe-commits at lists.llvm.org
Mon May 26 03:11:33 PDT 2025


================
@@ -17,16 +17,37 @@
 #include <__type_traits/is_reference.h>
 #include <__type_traits/remove_cvref.h>
 #include <__type_traits/remove_reference.h>
+#include <__type_traits/type_identity.h>
 #include <__utility/declval.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
+#if _LIBCPP_STD_VER >= 20
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-// common_reference
-#if _LIBCPP_STD_VER >= 20
+template <class...>
+struct common_reference;
----------------
frederick-vs-ja wrote:

FYI I've opened #141465 to add `_LIBCPP_NO_SPECIALIZATIONS` to `common_reference`. Once the affected test gets fixed, we can also add `_LIBCPP_NO_SPECIALIZATIONS` here.

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


More information about the cfe-commits mailing list