@@ -247,16 +247,6 @@ TEST_CASE("exception thrown from recursive call can be caught by caller")
247
247
248
248
TEST_CASE (" exceptions thrown from nested call can be caught by caller" )
249
249
{
250
- #if _MSC_VER >= 1929 && _MSVC_LANG == 202002L
251
- /*
252
- * Crashes. Known bug, reported in
253
- * https://github.com/andreasbuhr/cppcoro/issues/53
254
- * and
255
- * https://developercommunity.visualstudio.com/t/MSVC-generates-segfaulting-code-for-coro/10074712
256
- */
257
- return ;
258
- #endif
259
-
260
250
class SomeException : public std ::exception {};
261
251
262
252
auto f = [](std::uint32_t depth, auto && f) -> recursive_generator<std::uint32_t >
@@ -271,7 +261,8 @@ TEST_CASE("exceptions thrown from nested call can be caught by caller")
271
261
272
262
try
273
263
{
274
- co_yield f (4 , f);
264
+ auto next_generator = f (4 , f);
265
+ co_yield next_generator;
275
266
}
276
267
catch (SomeException)
277
268
{
@@ -286,7 +277,8 @@ TEST_CASE("exceptions thrown from nested call can be caught by caller")
286
277
bool caught = false ;
287
278
try
288
279
{
289
- co_yield f (3 , f);
280
+ auto next_generator = f (3 , f);
281
+ co_yield next_generator;
290
282
}
291
283
catch (SomeException)
292
284
{
@@ -301,8 +293,10 @@ TEST_CASE("exceptions thrown from nested call can be caught by caller")
301
293
else
302
294
{
303
295
co_yield 1 ;
304
- co_yield f (2 , f);
305
- co_yield f (3 , f);
296
+ auto next_generator = f (2 , f);
297
+ co_yield next_generator;
298
+ auto next_generator2 = f (3 , f);
299
+ co_yield next_generator2;
306
300
}
307
301
};
308
302
0 commit comments