aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-p2113a.C
blob: e2652dd12f3ab1184c2602f91a21b4eab3d5faa5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Test that the second foo is not considered more specialized because we don't
// compare constraints unless the template parameters and function parameters
// are equivalent (P2113)

// { dg-do compile { target c++20 } }

template <typename T> concept P = true;

template <typename T> void foo(int, T);
template <P U>        void foo(U, int);

void bar() { foo(1,2); }	// { dg-error "ambiguous" }