We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f67e55a commit f48d7a6Copy full SHA for f48d7a6
strings/base_coroutine_foundation.h
@@ -305,7 +305,7 @@ namespace winrt::impl
305
return *this;
306
}
307
308
- void operator()(Progress const& result)
+ void operator()(Progress const& result) const
309
{
310
m_promise->set_progress(result);
311
test/test/async_progress.cpp
@@ -19,8 +19,12 @@ namespace
19
IAsyncOperationWithProgress<int, int> Operation(HANDLE event)
20
21
co_await resume_on_signal(event);
22
- auto progress = co_await get_progress_token();
23
- progress(123);
+
+ // Invoke from a lambda to ensure that operator() is const.
24
+ [progress = co_await get_progress_token()]()
25
+ {
26
+ progress(123);
27
+ }();
28
co_return 1;
29
30
0 commit comments