File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
CXX/expr/expr.prim/expr.prim.req Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ template<typename T>
89
89
concept Large = sizeof (typename remove_reference<T>::type) >= 4 ;
90
90
// expected-note@-1{{because 'sizeof(typename remove_reference<short &>::type) >= 4' (2 >= 4) evaluated to false}}
91
91
92
- template <typename T> requires requires (T t) { { t } -> Large; } // expected-note{{because 'short &' does not satisfy 'Large': }}
92
+ template <typename T> requires requires (T t) { { t } -> Large; } // expected-note{{because 'short &' does not satisfy 'Large'}}
93
93
struct r7 {};
94
94
95
95
using r7i1 = r7<int >;
@@ -160,7 +160,7 @@ namespace std_example {
160
160
template <typename T> concept C2 =
161
161
requires (T x) {
162
162
{*x} -> same_as<typename T::inner>;
163
- // expected-note@-1{{because type constraint 'same_as<int, typename T2::inner>' was not satisfied: }}
163
+ // expected-note@-1{{because 'same_as<int, typename T2::inner>' evaluated to false }}
164
164
// expected-note@-2{{because '*x' would be invalid: indirection requires pointer operand ('int' invalid)}}
165
165
};
166
166
Original file line number Diff line number Diff line change 1
1
// RUN: %clang -fsyntax-only -std=c++2a -Xclang -verify -ftemplate-depth=5 -ftemplate-backtrace-limit=4 %s
2
2
3
- // RequiresExpr contains invalid requirement. (Eg. Highly recurisive template).
3
+ // RequiresExpr contains invalid requirement. (Eg. Highly recursive template).
4
4
template <int x>
5
5
struct A { static constexpr bool far (); };
6
6
class B {
@@ -17,10 +17,9 @@ constexpr bool A<x>::far() {
17
17
b.data_member ;
18
18
requires A<x-1 >::far (); // #Invalid
19
19
// expected-error@#Invalid {{recursive template instantiation exceeded maximum depth}}
20
- // expected-note@#Invalid {{in instantiation}}
21
- // expected-note@#Invalid 2 {{while}}
20
+ // expected-note@#Invalid 2 {{in instantiation}}
21
+ // expected-note@#Invalid 1 {{while}}
22
22
// expected-note@#Invalid {{contexts in backtrace}}
23
- // expected-note@#Invalid {{increase recursive template instantiation depth}}
24
23
};
25
24
}
26
25
static_assert (A<1 >::far());
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ template<typename T>
7
7
constexpr bool is_same_v<T, T> = true ;
8
8
9
9
template <typename T, typename U>
10
- concept same_as = is_same_v<T, U>;
10
+ concept same_as = is_same_v<T, U>; // #is_same_v
11
11
12
12
template <typename T, typename ... Us>
13
13
concept either = (is_same_v<T, Us> || ...);
@@ -16,6 +16,7 @@ template<typename... Ts>
16
16
struct T {
17
17
template <same_as<Ts>... Us>
18
18
// expected-note@-1{{because 'same_as<int, bool>' evaluated to false}}
19
+ // expected-note@#is_same_v{{because 'is_same_v<int, bool>' evaluated to false}}
19
20
static void foo (Us... u, int x) { };
20
21
// expected-note@-1{{candidate template ignored: deduced too few arguments}}
21
22
// expected-note@-2{{candidate template ignored: constraints not satisfied}}
You can’t perform that action at this time.
0 commit comments