Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion strings/base_coroutine_foundation.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ namespace winrt::impl
}
}

#ifdef __cpp_coroutines
#ifdef WINRT_IMPL_COROUTINES
WINRT_EXPORT namespace winrt::Windows::Foundation
{
inline impl::await_adapter<IAsyncAction> operator co_await(IAsyncAction const& async)
Expand Down
2 changes: 1 addition & 1 deletion strings/base_coroutine_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ WINRT_EXPORT namespace winrt
return awaitable{ dispatcher, priority };
};

#ifdef __cpp_coroutines
#ifdef WINRT_IMPL_COROUTINES
inline auto operator co_await(Windows::System::DispatcherQueue const& dispatcher)
{
return resume_foreground(dispatcher);
Expand Down
2 changes: 1 addition & 1 deletion strings/base_coroutine_system_winui.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ WINRT_EXPORT namespace winrt
return awaitable{ dispatcher, priority };
};

#ifdef __cpp_coroutines
#ifdef WINRT_IMPL_COROUTINES
inline auto operator co_await(Microsoft::System::DispatcherQueue const& dispatcher)
{
return resume_foreground(dispatcher);
Expand Down
2 changes: 1 addition & 1 deletion strings/base_coroutine_threadpool.h
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ WINRT_EXPORT namespace winrt
return awaitable{ duration };
}

#ifdef __cpp_coroutines
#ifdef WINRT_IMPL_COROUTINES
inline auto operator co_await(Windows::Foundation::TimeSpan duration)
{
return resume_after(duration);
Expand Down
2 changes: 1 addition & 1 deletion strings/base_coroutine_ui_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ WINRT_EXPORT namespace winrt
return awaitable{ dispatcher, priority };
};

#ifdef __cpp_coroutines
#ifdef WINRT_IMPL_COROUTINES
inline auto operator co_await(Windows::UI::Core::CoreDispatcher const& dispatcher)
{
return resume_foreground(dispatcher);
Expand Down
2 changes: 1 addition & 1 deletion strings/base_deferral.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

WINRT_EXPORT namespace winrt
{
#ifdef __cpp_coroutines
#ifdef WINRT_IMPL_COROUTINES
template<typename D>
struct deferrable_event_args
{
Expand Down
4 changes: 2 additions & 2 deletions strings/base_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
// Note: this is a workaround for a false-positive warning produced by the Visual C++ 16.3 compiler.
#pragma warning(disable : 4268)

#if defined(_RESUMABLE_FUNCTIONS_SUPPORTED) && !defined(__cpp_coroutines)
#define __cpp_coroutines
#if defined(__cpp_lib_coroutine) || defined(__cpp_coroutines) || defined(_RESUMABLE_FUNCTIONS_SUPPORTED)
#define WINRT_IMPL_COROUTINES
#endif

#ifndef WINRT_EXPORT
Expand Down