blob: 22be5ab34f768dbea4c022a340a4e7c0f0b34b7e [file] [log] [blame]
Douglas Gregorc45c2322009-03-31 00:43:58 +00001// RUN: clang-cc -fsyntax-only %s
2
3struct add_pointer {
4 template<typename T>
5 struct apply {
6 typedef T* type;
7 };
8};
9
10struct add_reference {
11 template<typename T>
12 struct apply {
13 typedef T& type;
14 };
15};
16
17template<typename MetaFun, typename T>
18struct apply1 {
19 typedef typename MetaFun::template apply<T>::type type;
20};
21
22#if 0
23// FIXME: The code below requires template instantiation for dependent
24// template-names that occur within nested-name-specifiers.
25int i;
26
27apply1<add_pointer, int>::type ip = &i;
28apply1<add_reference, int>::type ir = i;
29#endif