Skip to content

Commit 8f40198

Browse files
authored
Fix edge case in nested Windows namespace (#1004)
1 parent 4366357 commit 8f40198

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

cppwinrt/code_writers.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2426,10 +2426,10 @@ struct __declspec(empty_bases) produce_dispatch_to_overridable<T, D, %>
24262426
w.write(format, bind<write_generic_typenames>(generics));
24272427
}
24282428

2429-
auto format = R"( struct % : Windows::Foundation::IUnknown
2429+
auto format = R"( struct % : winrt::Windows::Foundation::IUnknown
24302430
{%
24312431
%(std::nullptr_t = nullptr) noexcept {}
2432-
%(void* ptr, take_ownership_from_abi_t) noexcept : Windows::Foundation::IUnknown(ptr, take_ownership_from_abi) {}
2432+
%(void* ptr, take_ownership_from_abi_t) noexcept : winrt::Windows::Foundation::IUnknown(ptr, take_ownership_from_abi) {}
24332433
template <typename L> %(L lambda);
24342434
template <typename F> %(F* function);
24352435
template <typename O, typename M> %(O* object, M method);

test/test_component/test_component.idl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,5 +293,7 @@ namespace test_component
293293
static void StaticMethod(Struct param);
294294
void Method(Windows.Foundation.Uri param);
295295
}
296+
297+
delegate void Delegate();
296298
}
297299
}

0 commit comments

Comments
 (0)