================ @@ -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, ---------------- mizvekov wrote:
An advantage of the builtin templates is that we can introduce deduction rules for them, although we currently don't do that for any of the existing ones. One example: ```C++ template <class...> struct A {}; template <class T, class U> void f(__builtin_type_pack_dedup<A, T, U>); void test() { A<int, int, char> a; f(a); // OK, deduced as T = int, U = char } ``` An example of how this could apply to existing __make_integer_seq: ```C++ template <class T, T Count> void f(__make_integer_seq(std::integer_sequence, T, Count)) {} void test() { f(std::make_integer_sequence<int, 12>{}); // OK, deduced T = int, Count = 12 } ``` ``` https://github.com/llvm/llvm-project/pull/106730 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits