[libcxx-commits] [libcxx] [libc++] Disallow specializing `common_reference` (PR #141465)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Mon May 26 02:22:36 PDT 2025


================
@@ -109,11 +109,18 @@ struct __common_ref {};
 // Note C: For the common_reference trait applied to a parameter pack [...]
 
 template <class...>
-struct common_reference;
+struct _LIBCPP_NO_SPECIALIZATIONS common_reference;
 
 template <class... _Types>
 using common_reference_t = typename common_reference<_Types...>::type;
 
+template <class, class, template <class> class, template <class> class>
+struct basic_common_reference {};
----------------
frederick-vs-ja wrote:

I'm moving `basic_common_reference` here, because it's a standard library component and it's a bit weird to me to leave it in an "implementation detail code section".

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


More information about the libcxx-commits mailing list