File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -138,19 +138,25 @@ TEST_CASE("task of reference type")
138
138
SUBCASE (" awaiting rvalue task" )
139
139
{
140
140
decltype (auto ) result = co_await f ();
141
+ // MSVC 19.xx fails to handle this assertion
142
+ // making all the test file failing to compile with weird errors
143
+ #if !CPPCORO_COMPILER_MSVC || CPPCORO_COMPILER_MSVC < 19'00'00000
141
144
static_assert (
142
145
std::is_same<decltype (result), int &>::value,
143
146
" co_await r-value reference of task<int&> should result in an int&" );
147
+ #endif
144
148
CHECK (&result == &value);
145
149
}
146
150
147
151
SUBCASE (" awaiting lvalue task" )
148
152
{
149
153
auto t = f ();
150
154
decltype (auto ) result = co_await t;
155
+ #if !CPPCORO_COMPILER_MSVC || CPPCORO_COMPILER_MSVC < 19'00'00000
151
156
static_assert (
152
157
std::is_same<decltype (result), int &>::value,
153
158
" co_await l-value reference of task<int&> should result in an int&" );
159
+ #endif
154
160
CHECK (&result == &value);
155
161
}
156
162
}());
You can’t perform that action at this time.
0 commit comments