Skip to content

Commit 4366357

Browse files
authored
Some uses of co_await were not protected by WINRT_IMPL_COROUTINES (#1002)
1 parent 4ba22a6 commit 4366357

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

strings/base_coroutine_foundation.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ namespace winrt::impl
127127
}
128128
};
129129

130+
#ifdef WINRT_IMPL_COROUTINES
130131
template <typename Async>
131132
struct await_adapter : enable_await_cancellation
132133
{
@@ -177,6 +178,7 @@ namespace winrt::impl
177178
}
178179
}
179180
};
181+
#endif
180182

181183
template <typename D>
182184
auto consume_Windows_Foundation_IAsyncAction<D>::get() const
@@ -793,6 +795,7 @@ namespace std::experimental
793795

794796
WINRT_EXPORT namespace winrt
795797
{
798+
#ifdef WINRT_IMPL_COROUTINES
796799
template <typename... T>
797800
Windows::Foundation::IAsyncAction when_all(T... async)
798801
{
@@ -838,4 +841,5 @@ WINRT_EXPORT namespace winrt
838841
impl::check_status_canceled(shared->status);
839842
co_return shared->result.GetResults();
840843
}
844+
#endif
841845
}

0 commit comments

Comments
 (0)