[clang] [clang-tools-extra] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 10 01:57:25 PDT 2024


================
@@ -309,7 +309,10 @@ enum BuiltinTemplateKind : int {
   BTK__make_integer_seq,
 
   /// This names the __type_pack_element BuiltinTemplateDecl.
-  BTK__type_pack_element
+  BTK__type_pack_element,
+
+  /// This names the __type_list_dedup BuiltinTemplateDecl.
+  BTK__type_list_dedup,
----------------
ilya-biryukov wrote:

On the argument of adding `VariadicTransformType`, maybe it's useful for something, but I definitely don't see why introducing a new bulitin template is more complicated than introducing a new type trait. I think they're quite on par in terms of complexity and we should be looking at what fits the language design better (see first two bullet points above on why I feel it's a better choice for the language).

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


More information about the cfe-commits mailing list