blob: dbf12dacbae2681fc82152b3d110e31cd87133e7 [file] [log] [blame]
Richard Smith5de91b52013-06-25 01:25:15 +00001@import cxx_templates_common;
2
Richard Smith8f8f05c2013-06-24 04:45:28 +00003template<typename T> T f() { return T(); }
4template<typename T> T f(T);
5namespace N {
6 template<typename T> T f() { return T(); }
7 template<typename T> T f(T);
8}
Richard Smithbf78e642013-06-24 22:51:00 +00009
10template<int N> int template_param_kinds_1();
11template<template<typename T, int, int> class> int template_param_kinds_2();
12template<template<typename T, typename U, T> class> int template_param_kinds_3();
Richard Smith5de91b52013-06-25 01:25:15 +000013
14template<typename T> struct SomeTemplate<T*>;
15template<typename T> struct SomeTemplate<T*> {};
16typedef SomeTemplate<int*> SomeTemplateIntPtr;
Richard Smith0e5d7b82013-07-25 23:08:39 +000017
18template<typename T> void PerformDelayedLookup(T &t) {
19 t.f();
20 typename T::Inner inner;
21 FoundByADL(t);
22}
Richard Smithb71782b2013-08-01 04:12:04 +000023
24template<typename T> void PerformDelayedLookupInDefaultArgument(T &t, int a = (FoundByADL(T()), 0)) {}
Richard Smith7ecc31b2013-08-02 01:09:12 +000025
26template<typename T> struct RedeclaredAsFriend {};