================ @@ -14,16 +14,30 @@ #include <__type_traits/decay.h> #include <__type_traits/is_same.h> #include <__type_traits/remove_cvref.h> +#include <__type_traits/type_identity.h> #include <__type_traits/void_t.h> #include <__utility/declval.h> +#include <__utility/empty.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif _LIBCPP_BEGIN_NAMESPACE_STD -#if _LIBCPP_STD_VER >= 20 +#if __has_builtin(__builtin_common_type) + +template <class... _Args> +struct common_type; + +template <class... _Args> +using __common_type_t = typename common_type<_Args...>::type; + +template <class... _Args> +struct common_type : __builtin_common_type<__common_type_t, __type_identity, __empty, _Args...> {}; ---------------- philnik777 wrote:
@ldionne I think you actually want to export `__type_traits/type_identity.h` and `__utility/empty.h`, since the alias resolves to one of these types in the end. https://github.com/llvm/llvm-project/pull/99473 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits