Skip to content
Merged
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
10 changes: 1 addition & 9 deletions cppwinrt/code_writers.h
Original file line number Diff line number Diff line change
Expand Up @@ -1197,17 +1197,9 @@ namespace cppwinrt
method_signature signature{ method };
auto async_types_guard = w.push_async_types(signature.is_async());

//
// Note: this use of a lambda is a workaround for a Visual C++ compiler bug:
// https://developercommunity.visualstudio.com/content/problem/554130/incorrect-code-gen-when-invoking-a-conversion-oper.html
// Once fixed, revert the function body back to this:
//
// return static_cast<% const&>(*this).%(%);
//

std::string_view format = R"( inline auto %::%(%) const%
{
return [&](% const& winrt_impl_base) { return winrt_impl_base.%(%); }(*this);
return static_cast<% const&>(*this).%(%);
}
)";

Expand Down