Mercurial > hg > CbC > CbC_gcc
diff gcc/testsuite/g++.dg/cpp2a/fn-template10.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gcc/testsuite/g++.dg/cpp2a/fn-template10.C Thu Feb 13 11:34:05 2020 +0900 @@ -0,0 +1,22 @@ +// P0846R0 +// { dg-do compile } +// { dg-options "-std=c++2a" } + +int h; +void g(); +void e(); +void e(int); +void e(int, int); + +namespace N { + struct A { }; + template <class T> static int f(T) { return 1; } + template <class T> static int g(T) { return 2; } + template <class T> static int h(T); + template <class T> static int e(T) { return 3; } +} + +int v = e<N::A>(N::A()); +int x = f<N::A>(N::A()); +int y = g<N::A>(N::A()); +int z = h<N::A>(N::A()); // { dg-error "expected" }