Skip to content

Commit ac05e2a

Browse files
author
Tobias Loew
committed
fixed VS 2017 workarounds
1 parent c9e7e9e commit ac05e2a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.13)
1+
cmake_minimum_required(VERSION 3.12)
22
project(cppcoro LANGUAGES CXX)
33

44
set(CMAKE_CXX_EXTENSIONS OFF)

include/cppcoro/detail/when_all_task.hpp

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

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

include/cppcoro/sync_wait.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace cppcoro
1818
auto sync_wait(AWAITABLE&& awaitable)
1919
-> typename cppcoro::awaitable_traits<AWAITABLE&&>::await_result_t
2020
{
21-
#if CPPCORO_COMPILER_MSVC && CPPCORO_COMPILER_MSVC < 19'00'00000
21+
#if CPPCORO_COMPILER_MSVC && CPPCORO_COMPILER_MSVC < 19'20'00000
2222
// HACK: Need to explicitly specify template argument to make_sync_wait_task
2323
// here to work around a bug in MSVC when passing parameters by universal
2424
// reference to a coroutine which causes the compiler to think it needs to

0 commit comments

Comments
 (0)