Skip to content

Commit a7f0233

Browse files
Remove WINRT_EXPORT in Component.g.cpp (#1597)
Co-authored-by: Ryan Shepherd <ryansh@microsoft.com>
1 parent d6cff31 commit a7f0233

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

cppwinrt/code_writers.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,17 @@ namespace cppwinrt
226226
return { w, write_close_namespace };
227227
}
228228

229+
[[nodiscard]] static finish_with wrap_type_namespace_without_export(writer& w, std::string_view const& ns)
230+
{
231+
auto format = R"(namespace winrt::@
232+
{
233+
)";
234+
235+
w.write(format, ns);
236+
237+
return { w, write_close_namespace };
238+
}
239+
229240
static void write_enum_field(writer& w, Field const& field)
230241
{
231242
auto format = R"( % = %,

cppwinrt/component_writers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ catch (...) { return winrt::to_hresult(); }
400400
return;
401401
}
402402

403-
auto wrap_type = wrap_type_namespace(w, type_namespace);
403+
auto wrap_type = wrap_type_namespace_without_export(w, type_namespace);
404404

405405
for (auto&&[factory_name, factory] : get_factories(w, type))
406406
{

0 commit comments

Comments
 (0)