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
4 changes: 2 additions & 2 deletions cppwinrt/component_writers.h
Original file line number Diff line number Diff line change
Expand Up @@ -478,15 +478,15 @@ catch (...) { return winrt::to_hresult(); }

if (is_add_overload(method) || is_remove_overload(method))
{
auto format = R"( auto %::%(%)
auto format = R"( % %::%(%)
{
auto f = make<winrt::@::factory_implementation::%>().as<%>();
return f.%(%);
}
)";


w.write(format,
signature.return_signature(),
type_name,
method_name,
bind<write_consume_params>(signature),
Expand Down
4 changes: 4 additions & 0 deletions test/test_component/Simple.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ namespace winrt::test_component::implementation
Windows::Foundation::IAsyncOperation<int32_t> Operation(Windows::Foundation::DateTime value);
Windows::Foundation::IAsyncAction Action(Windows::Foundation::DateTime value);
Windows::Foundation::IInspectable Object(Windows::Foundation::DateTime const& value);

// All we care about static events (for now) is that they build.
static event_token StaticEvent(Windows::Foundation::EventHandler<IInspectable> const&) { return {}; }
static void StaticEvent(event_token) { }
};
}
namespace winrt::test_component::factory_implementation
Expand Down
1 change: 1 addition & 0 deletions test/test_component/test_component.idl
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ namespace test_component
Windows.Foundation.IAsyncOperation<Int32> Operation(Windows.Foundation.DateTime value);
Windows.Foundation.IAsyncAction Action(Windows.Foundation.DateTime value);
Object Object(Windows.Foundation.DateTime value);
static event Windows.Foundation.EventHandler<Object> StaticEvent;
}

runtimeclass DeferrableEventArgs
Expand Down