diff options
Diffstat (limited to 'gcc_arm/testsuite/g++.old-deja/g++.pt/explicit15.C')
-rwxr-xr-x | gcc_arm/testsuite/g++.old-deja/g++.pt/explicit15.C | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit15.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit15.C new file mode 100755 index 0000000..290da42 --- /dev/null +++ b/gcc_arm/testsuite/g++.old-deja/g++.pt/explicit15.C @@ -0,0 +1,30 @@ +// Build don't link: +// GROUPS passed templates +template<int N_rank> +class Array; + + +template<class T> +class ArraySectionInfo { +public: + enum { rank = 0 }; +}; + + +template<class T1> +class SliceInfo { +public: + enum { + rank = ArraySectionInfo<T1>::rank + }; + + typedef Array<rank> T_slice; +}; + +template<class T2> +typename SliceInfo<T2>::T_slice +foo(T2 r2) +{ + return SliceInfo<T2>::T_slice(); +} + |