diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/overload2.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/overload2.C | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/overload2.C b/gcc/testsuite/g++.old-deja/g++.other/overload2.C new file mode 100644 index 000000000..88fe0a218 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/overload2.C @@ -0,0 +1,24 @@ +// { dg-do link } + +template <class T> +class ConstArray { +}; + +template <class T1, class T2> +void operator+(const ConstArray<T1>&, const ConstArray<T2>&) +{ +} + +template <class T1, class T2> +void operator+(const ConstArray<T1>&, T2); + +template <class T1, class T2> +void operator+(T1, const ConstArray<T2>&); + +const ConstArray<int> cai() { return ConstArray<int>(); } +const ConstArray<double> cad() { return ConstArray<double>(); } + +int main() +{ + cai () + cad (); +} |