diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/template/error45.C')
-rw-r--r-- | gcc/testsuite/g++.dg/template/error45.C | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/error45.C b/gcc/testsuite/g++.dg/template/error45.C new file mode 100644 index 000000000..454acc631 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/error45.C @@ -0,0 +1,22 @@ +// PR c++/47125 + +template < bool, typename > +struct enable_if {}; + +template < typename T > +struct enable_if< true, T > +{ + typedef T type; +}; + +template < typename T > +struct enable_if< true, T >::type +f( T x ); + +void +g( void ) +{ + f< int >( 0 ); // { dg-error "no match" } +} + +// { dg-prune-output "note" } |