You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: libcxx/test/libcxx/utilities/expected/expected.expected/and_then.mandates.verify.cpp
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ void test() {
51
51
// U is not a specialization of std::expected
52
52
{
53
53
std::expected<int, int> f1(1);
54
-
f1.and_then(lval_return_not_std_expected); // expected-note{{in instantiation of function template specialization 'std::expected<int, int>::and_then<int (&)(int &)>' requested here}}
54
+
(void)f1.and_then(lval_return_not_std_expected); // expected-note{{in instantiation of function template specialization 'std::expected<int, int>::and_then<int (&)(int &)>' requested here}}
55
55
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f(value()) must be a specialization of std::expected}}
56
56
// expected-error-re@*:* {{{{.*}}cannot be used prior to '::' because it has no members}}
57
57
// expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}
@@ -61,7 +61,7 @@ void test() {
61
61
// !std::is_same_v<U:error_type, E>
62
62
{
63
63
std::expected<int, int> f1(1);
64
-
f1.and_then(lval_error_type_not_same_as_int); // expected-note{{in instantiation of function template specialization 'std::expected<int, int>::and_then<std::expected<int, NotSameAsInt> (&)(int &)>' requested here}}
64
+
(void)f1.and_then(lval_error_type_not_same_as_int); // expected-note{{in instantiation of function template specialization 'std::expected<int, int>::and_then<std::expected<int, NotSameAsInt> (&)(int &)>' requested here}}
65
65
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f(value()) must have the same error_type as this expected}}
66
66
}
67
67
}
@@ -71,7 +71,7 @@ void test() {
71
71
// U is not a specialization of std::expected
72
72
{
73
73
const std::expected<int, int> f1(1);
74
-
f1.and_then(clval_return_not_std_expected); // expected-note{{in instantiation of function template specialization 'std::expected<int, int>::and_then<int (&)(const int &)>' requested here}}
74
+
(void)f1.and_then(clval_return_not_std_expected); // expected-note{{in instantiation of function template specialization 'std::expected<int, int>::and_then<int (&)(const int &)>' requested here}}
75
75
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f(value()) must be a specialization of std::expected}}
76
76
// expected-error-re@*:* {{{{.*}}cannot be used prior to '::' because it has no members}}
77
77
// expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}
@@ -81,7 +81,7 @@ void test() {
81
81
// !std::is_same_v<U:error_type, E>
82
82
{
83
83
const std::expected<int, int> f1(1);
84
-
f1.and_then(clval_error_type_not_same_as_int); // expected-note{{in instantiation of function template specialization 'std::expected<int, int>::and_then<std::expected<int, NotSameAsInt> (&)(const int &)>' requested here}}
84
+
(void)f1.and_then(clval_error_type_not_same_as_int); // expected-note{{in instantiation of function template specialization 'std::expected<int, int>::and_then<std::expected<int, NotSameAsInt> (&)(const int &)>' requested here}}
85
85
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f(value()) must have the same error_type as this expected}}
86
86
87
87
}
@@ -92,7 +92,7 @@ void test() {
92
92
// U is not a specialization of std::expected
93
93
{
94
94
std::expected<int, int> f1(1);
95
-
std::move(f1).and_then(rval_return_not_std_expected); // expected-note{{in instantiation of function template specialization 'std::expected<int, int>::and_then<int (&)(int &&)>' requested here}}
95
+
(void)std::move(f1).and_then(rval_return_not_std_expected); // expected-note{{in instantiation of function template specialization 'std::expected<int, int>::and_then<int (&)(int &&)>' requested here}}
96
96
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f(std::move(value())) must be a specialization of std::expected}}
97
97
// expected-error-re@*:* {{{{.*}}cannot be used prior to '::' because it has no members}}
98
98
// expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}
@@ -102,7 +102,7 @@ void test() {
102
102
// !std::is_same_v<U:error_type, E>
103
103
{
104
104
std::expected<int, int> f1(1);
105
-
std::move(f1).and_then(rval_error_type_not_same_as_int); // expected-note{{in instantiation of function template specialization 'std::expected<int, int>::and_then<std::expected<int, NotSameAsInt> (&)(int &&)>' requested here}}
105
+
(void)std::move(f1).and_then(rval_error_type_not_same_as_int); // expected-note{{in instantiation of function template specialization 'std::expected<int, int>::and_then<std::expected<int, NotSameAsInt> (&)(int &&)>' requested here}}
106
106
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f(std::move(value())) must have the same error_type as this expected}}
107
107
}
108
108
}
@@ -112,7 +112,7 @@ void test() {
112
112
// U is not a specialization of std::expected
113
113
{
114
114
const std::expected<int, int> f1(1);
115
-
std::move(f1).and_then(crval_return_not_std_expected); // expected-note{{in instantiation of function template specialization 'std::expected<int, int>::and_then<int (&)(const int &&)>' requested here}}
115
+
(void)std::move(f1).and_then(crval_return_not_std_expected); // expected-note{{in instantiation of function template specialization 'std::expected<int, int>::and_then<int (&)(const int &&)>' requested here}}
116
116
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f(std::move(value())) must be a specialization of std::expected}}
117
117
// expected-error-re@*:* {{{{.*}}cannot be used prior to '::' because it has no members}}
118
118
// expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}
@@ -122,7 +122,7 @@ void test() {
122
122
// !std::is_same_v<U:error_type, E>
123
123
{
124
124
const std::expected<int, int> f1(1);
125
-
std::move(f1).and_then(crval_error_type_not_same_as_int); // expected-note{{in instantiation of function template specialization 'std::expected<int, int>::and_then<std::expected<int, NotSameAsInt> (&)(const int &&)>' requested here}}
125
+
(void)std::move(f1).and_then(crval_error_type_not_same_as_int); // expected-note{{in instantiation of function template specialization 'std::expected<int, int>::and_then<std::expected<int, NotSameAsInt> (&)(const int &&)>' requested here}}
126
126
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f(std::move(value())) must have the same error_type as this expected}}
f1.or_else(clval_return_not_std_expected); // expected-note{{in instantiation of function template specialization 'std::expected<int, int>::or_else<int (&)(const int &)>' requested here}}
74
+
(void)f1.or_else(clval_return_not_std_expected); // expected-note{{in instantiation of function template specialization 'std::expected<int, int>::or_else<int (&)(const int &)>' requested here}}
75
75
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f(error()) must be a specialization of std::expected}}
76
76
// expected-error-re@*:* {{{{.*}}cannot be used prior to '::' because it has no members}}
77
77
// expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}
std::move(f1).or_else(crval_return_not_std_expected); // expected-note{{in instantiation of function template specialization 'std::expected<int, int>::or_else<int (&)(const int &&)>' requested here}}
114
+
(void)std::move(f1).or_else(crval_return_not_std_expected); // expected-note{{in instantiation of function template specialization 'std::expected<int, int>::or_else<int (&)(const int &&)>' requested here}}
115
115
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f(std::move(error())) must be a specialization of std::expected}}
116
116
// expected-error-re@*:* {{{{.*}}cannot be used prior to '::' because it has no members}}
117
117
// expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}
0 commit comments