Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
56ce423
Improve C++20 modules support
sylveon Jun 2, 2021
3430aad
IAsyncOperation started working, so enable it back
sylveon Jul 31, 2021
e824d4d
Merge branch 'master' into user/sjones/modules
Scottj1s Dec 9, 2021
ac0b44d
merge fixes, workaround
Scottj1s Dec 9, 2021
ce85a5a
Merge branch 'master' into user/sjones/modules
sylveon May 27, 2022
5b41ed8
Remove workarounds for now fixed issues
sylveon May 27, 2022
f233743
Switch to using /std:c++20 for test_cpp20
sylveon May 27, 2022
855072d
Fix include in purview of a module
sylveon May 31, 2022
42b1984
[WIP] Modular C++20 module support
sylveon Aug 24, 2022
494ac8f
Remove experimental coroutines support
sylveon Nov 6, 2025
b8d5690
Fix clang-cl mismatching signedness error
sylveon Nov 6, 2025
6c2773b
Merge branch 'master' into user/sylveon/await
DefaultRyan Mar 13, 2026
de710f1
Require coroutine support for C++/WinRT
DefaultRyan Mar 13, 2026
5fd5dd6
Merge branch 'master' of https://github.com/microsoft/cppwinrt into u…
sylveon Mar 14, 2026
a3791af
Merge branch 'user/sylveon/await' of https://github.com/sylveon/cppwi…
sylveon Mar 15, 2026
fefb00a
WIP
sylveon Mar 15, 2026
45ed914
Fixes
sylveon Mar 15, 2026
6f7cd5f
Merge branch 'master' of https://github.com/microsoft/cppwinrt into u…
sylveon Mar 16, 2026
c014429
Avoid std includes in base.h when built as a module
sylveon Mar 16, 2026
fd81ad4
Restore version check functionality in modules mode
sylveon Mar 16, 2026
a5fe8aa
Fix version check under classic compilation
sylveon Mar 16, 2026
ba71dcc
Merge branch 'master' of https://github.com/microsoft/cppwinrt into u…
sylveon Mar 18, 2026
b7c9076
Add extern C++ to function pointer overrides to allow interop between…
sylveon Mar 18, 2026
3a5d23c
Also export them
sylveon Mar 18, 2026
97926f2
byte -> std::uint8_t
sylveon Mar 18, 2026
1b3c64c
Add #include <cstddeef> in base_version
sylveon Mar 21, 2026
136cb3b
Merge branch 'master' of https://github.com/microsoft/cppwinrt into u…
sylveon Mar 21, 2026
a618059
Fix integer fields causing impl promotion
sylveon Mar 21, 2026
18157da
Merge branch 'master' of https://github.com/microsoft/cppwinrt into u…
sylveon Mar 24, 2026
bece4d8
Fix natvis build
sylveon Mar 24, 2026
a0d17b6
Avoid non-portable include
sylveon Mar 24, 2026
5858e0a
Workaround compiler issue by hoisting access token guard outside of t…
sylveon Mar 24, 2026
7497739
Add missing inline
sylveon Mar 24, 2026
33d9011
Add dedicated modules tests
sylveon Mar 24, 2026
c80a12e
Bump CMake in test_cppmodules to 3.28 (required for modules)
sylveon Mar 24, 2026
09f386d
Remove TODO
sylveon Mar 24, 2026
ae4cca7
Remove stray impl export
sylveon Apr 15, 2026
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
Prev Previous commit
Next Next commit
Workaround compiler issue by hoisting access token guard outside of t…
…he function
  • Loading branch information
sylveon committed Mar 24, 2026
commit 5858e0a3857db145b284fe536979f0f2231284a6
47 changes: 24 additions & 23 deletions strings/base_security.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,31 +69,32 @@ WINRT_EXPORT namespace winrt
check_bool(WINRT_IMPL_SetThreadToken(nullptr, get()));
}

/*TODO: figure out why compiler ICEs auto operator()() const
{
struct guard
{
guard(access_token&& previous) noexcept : m_previous(std::move(previous))
{
}

~guard()
{
m_previous.revert();
}

guard(guard const&)
{
// A Visual C++ compiler bug (550631) requires the copy constructor even though it is never called.
WINRT_ASSERT(false);
}
auto operator()() const;
};
}

private:
namespace winrt::impl
{
struct access_token_guard
{
access_token_guard(access_token&& previous) noexcept : m_previous(std::move(previous))
{
}

access_token const m_previous;
};
~access_token_guard()
{
m_previous.revert();
}

return guard(impersonate());
}*/
private:
access_token const m_previous;
};
}

WINRT_EXPORT namespace winrt
{
auto access_token::operator()() const
{
return impl::access_token_guard(impersonate());
}
}