diff options
Diffstat (limited to 'gcc_arm/testsuite/g++.old-deja/g++.law/template2.C')
-rwxr-xr-x | gcc_arm/testsuite/g++.old-deja/g++.law/template2.C | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc_arm/testsuite/g++.old-deja/g++.law/template2.C b/gcc_arm/testsuite/g++.old-deja/g++.law/template2.C new file mode 100755 index 0000000..7fa2c76 --- /dev/null +++ b/gcc_arm/testsuite/g++.old-deja/g++.law/template2.C @@ -0,0 +1,17 @@ +// GROUPS passed templates +// Special g++ Options: -fguiding-decls +extern "C" void printf (char *, ...); + +template<class T> T max(T a, T b) { return a > b ? a : b; } + +int max(int, int); + +main() +{ + int j; + + j = max(1,2); + j = max (1, 'c'); + printf ("PASS\n"); +} + |