diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/template/explicit-args3.C')
-rw-r--r-- | gcc/testsuite/g++.dg/template/explicit-args3.C | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/explicit-args3.C b/gcc/testsuite/g++.dg/template/explicit-args3.C new file mode 100644 index 00000000000..c095e6688fd --- /dev/null +++ b/gcc/testsuite/g++.dg/template/explicit-args3.C @@ -0,0 +1,12 @@ +// PR c++/37177 + +template <class T> +struct A { }; + +template <class T> +void operator+(T, T); // { dg-error "class or enum" } + +int main() +{ + operator+<int>; // { dg-error "cannot resolve" } +} |