Open
Description
Description / Steps to reproduce the issue
zhang@MSIGE76 ~> cat winrt.cpp
#include <winrt/Windows.Foundation.h>
zhang@MSIGE76 ~> g++ winrt.cpp -std=c++20
In file included from winrt.cpp:1:
C:/msys64/ucrt64/include/winrt/Windows.Foundation.h: In member function 'winrt::Windows::Foundation::IAsyncAction winrt::deferrable_event_args<D>::wait_for_deferrals()':
C:/msys64/ucrt64/include/winrt/Windows.Foundation.h:3313:43: error: non-template type 'coroutine_handle' used as a template [-Wtemplate-body]
3313 | co_await awaitable{ {}, *this };
| ^
C:/msys64/ucrt64/include/winrt/Windows.Foundation.h:3313:13: error: cannot instantiate a 'coroutine handle' for promise type 'voi' [-Wtemplate-body]
3313 | co_await awaitable{ {}, *this };
| ^~~~~~~~
zhang@MSIGE76 ~ [1]> g++ --version
g++.exe (Rev2, Built by MSYS2 project) 15.1.0
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
zhang@MSIGE76 ~> which g++
/ucrt64/bin/g++
Expected behavior
It compiles successfully
Actual behavior
Errored out
Verification
- I have verified that my MSYS2 is up-to-date before submitting the report (see https://www.msys2.org/docs/updating/)
Windows Version
MINGW64_NT-10.0-26120
MINGW environments affected
- MINGW64
- MINGW32
- UCRT64
- CLANG64
- CLANGARM64
Are you willing to submit a PR?
No response