@@ -9,21 +9,24 @@ concept C2 = C1<Y{}, V>;
9
9
// sizeof(U) >= 4 [U = V (decltype(Y{}))]
10
10
11
11
template <char W>
12
- constexpr int foo () requires C2<int, W> { return 1 ; }
12
+ constexpr int foo () requires C2<int, W> { return 1 ; } // #cand1
13
13
// sizeof(U) >= 4 [U = W (decltype(int{}))]
14
14
15
15
template <char X>
16
16
// expected-note@+1{{candidate function}}
17
- constexpr int foo () requires C1<1, X> && true { return 2 ; }
17
+ constexpr int foo () requires C1<1, X> && true { return 2 ; } // #cand2
18
18
// sizeof(U) >= 4 [U = X (decltype(1))]
19
19
20
- // GCC rejects it: https://godbolt.org/z/MWG756K8c
21
20
static_assert (foo<' a' >() == 2 );
21
+ // expected-error@-1 {{call to 'foo' is ambiguous}}
22
+ // expected-note@#cand1 {{candidate function}}
23
+ // expected-note@#cand2 {{candidate function}}
22
24
23
25
template <char Z>
24
- // expected-note@+1{{candidate function}}
25
- constexpr int foo () requires C2<long long, Z> && true { return 3 ; }
26
+ constexpr int foo () requires C2<long long, Z> && true { return 3 ; } // #cand3
26
27
// sizeof(U) >= 4 [U = Z (decltype(long long{}))]
27
28
28
29
static_assert (foo<' a' >() == 3 );
29
- // expected-error@-1{{call to 'foo' is ambiguous}}
30
+ // expected-error@-1{{call to 'foo' is ambiguous}}
31
+ // expected-note@#cand1 {{candidate function}}
32
+ // expected-note@#cand3 {{candidate function}}
0 commit comments