1 @import cxx_templates_common;
3 template<typename T> T f() { return T(); }
4 template<typename T> T f(T);
6 template<typename T> T f() { return T(); }
7 template<typename T> T f(T);
10 template<int N> int template_param_kinds_1();
11 template<template<typename T, int, int> class> int template_param_kinds_2();
12 template<template<typename T, typename U, T> class> int template_param_kinds_3();
14 template<typename T> struct SomeTemplate<T*>;
15 template<typename T> struct SomeTemplate<T*> {};
16 typedef SomeTemplate<int*> SomeTemplateIntPtr;
18 template<typename T> void PerformDelayedLookup(T &t) {
20 typename T::Inner inner;
24 template<typename T> void PerformDelayedLookupInDefaultArgument(T &t, int a = (FoundByADL(T()), 0)) {}
26 template<typename T> struct RedeclaredAsFriend {};
28 void use_some_template_a() {
29 SomeTemplate<char[2]> a;
30 SomeTemplate<char[1]> b, c;
34 template<int> struct MergeTemplates;
35 MergeTemplates<0> *merge_templates_a;
37 auto enum_a_from_a = CommonTemplate<int>::a;
38 const auto enum_c_from_a = CommonTemplate<int>::c;
40 template<int> struct UseInt;
41 template<typename T> void UseRedeclaredEnum(UseInt<T() + CommonTemplate<char>::a>);
42 constexpr void (*UseRedeclaredEnumA)(UseInt<1>) = UseRedeclaredEnum<int>;
44 template<typename> struct MergeSpecializations;
45 template<typename T> struct MergeSpecializations<T*> {
46 typedef int partially_specialized_in_a;
48 template<> struct MergeSpecializations<char> {
49 typedef int explicitly_specialized_in_a;