Skip to content

Commit 198a827

Browse files
authored
VS 2017 compatibility for enable_await_cancellation (#757)
1 parent ff7ab25 commit 198a827

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

strings/base_coroutine_threadpool.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ WINRT_EXPORT namespace winrt
174174
struct enable_await_cancellation
175175
{
176176
enable_await_cancellation() noexcept = default;
177-
enable_await_cancellation(enable_await_cancellation const&) = delete;
177+
enable_await_cancellation(enable_await_cancellation const&) = default;
178178

179179
~enable_await_cancellation()
180180
{
@@ -223,7 +223,7 @@ namespace winrt::impl
223223
{
224224
decltype(get_awaiter(std::declval<T&&>())) awaitable;
225225

226-
notify_awaiter(T&& awaitable_arg, cancellable_promise* promise = nullptr) : awaitable(get_awaiter(static_cast<T&&>(awaitable_arg)))
226+
notify_awaiter(T&& awaitable_arg, [[maybe_unused]] cancellable_promise* promise = nullptr) : awaitable(get_awaiter(static_cast<T&&>(awaitable_arg)))
227227
{
228228
if constexpr (std::is_convertible_v<std::remove_reference_t<decltype(awaitable)>&, enable_await_cancellation&>)
229229
{

0 commit comments

Comments
 (0)