Skip to content

Commit 1081167

Browse files
committed
fixed VS 2017 builds
1 parent 016b67b commit 1081167

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

include/cppcoro/detail/sync_wait_task.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ namespace cppcoro
6868
return completion_notifier{};
6969
}
7070

71-
#if CPPCORO_COMPILER_MSVC && CPPCORO_COMPILER_MSVC < 19'00'00000
71+
#if CPPCORO_COMPILER_MSVC && CPPCORO_COMPILER_MSVC < 19'20'00000
7272
// HACK: This is needed to work around a bug in MSVC 2017.7/2017.8.
7373
// See comment in make_sync_wait_task below.
7474
template<typename Awaitable>
@@ -245,7 +245,7 @@ namespace cppcoro
245245

246246
};
247247

248-
#if CPPCORO_COMPILER_MSVC && CPPCORO_COMPILER_MSVC < 19'00'00000
248+
#if CPPCORO_COMPILER_MSVC && CPPCORO_COMPILER_MSVC < 19'20'00000
249249
// HACK: Work around bug in MSVC where passing a parameter by universal reference
250250
// results in an error when passed a move-only type, complaining that the copy-constructor
251251
// has been deleted. The parameter should be passed by reference and the compiler should

include/cppcoro/detail/when_all_task.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ namespace cppcoro
7676
assert(false);
7777
}
7878

79-
#if CPPCORO_COMPILER_MSVC && CPPCORO_COMPILER_MSVC < 19'00'00000
79+
#if CPPCORO_COMPILER_MSVC && CPPCORO_COMPILER_MSVC < 19'20'00000
8080
// HACK: This is needed to work around a bug in MSVC 2017.7/2017.8.
8181
// See comment in make_when_all_task below.
8282
template<typename Awaitable>
@@ -301,7 +301,7 @@ namespace cppcoro
301301
std::enable_if_t<!std::is_void_v<RESULT>, int> = 0>
302302
when_all_task<RESULT> make_when_all_task(AWAITABLE awaitable)
303303
{
304-
#if CPPCORO_COMPILER_MSVC && CPPCORO_COMPILER_MSVC < 19'00'00000
304+
#if CPPCORO_COMPILER_MSVC && CPPCORO_COMPILER_MSVC < 19'20'00000
305305
// HACK: Workaround another bug in MSVC where the expression 'co_yield co_await x' seems
306306
// to completely ignore the co_yield an never calls promise.yield_value().
307307
// The coroutine seems to be resuming the 'co_await' after the 'co_yield'
@@ -329,7 +329,7 @@ namespace cppcoro
329329
std::enable_if_t<!std::is_void_v<RESULT>, int> = 0>
330330
when_all_task<RESULT> make_when_all_task(std::reference_wrapper<AWAITABLE> awaitable)
331331
{
332-
#if CPPCORO_COMPILER_MSVC && CPPCORO_COMPILER_MSVC < 19'00'00000
332+
#if CPPCORO_COMPILER_MSVC && CPPCORO_COMPILER_MSVC < 19'20'00000
333333
// HACK: Workaround another bug in MSVC where the expression 'co_yield co_await x' seems
334334
// to completely ignore the co_yield and never calls promise.yield_value().
335335
// The coroutine seems to be resuming the 'co_await' after the 'co_yield'

0 commit comments

Comments
 (0)