@@ -992,9 +992,8 @@ namespace cppwinrt
992992 auto method_name = get_name (method);
993993 auto type = method.Parent ();
994994
995- w.write (" %WINRT_IMPL_AUTO(%) %(%) const%;\n " ,
995+ w.write (" %auto %(%) const%;\n " ,
996996 is_get_overload (method) ? " [[nodiscard]] " : " " ,
997- signature.return_signature (),
998997 method_name,
999998 bind<write_consume_params>(signature),
1000999 is_noexcept (method) ? " noexcept" : " " );
@@ -1133,15 +1132,15 @@ namespace cppwinrt
11331132 if (is_remove_overload (method))
11341133 {
11351134 // we intentionally ignore errors when unregistering event handlers to be consistent with event_revoker
1136- format = R"( template <typename D%> WINRT_IMPL_AUTO(%) consume_%<D%>::%(%) const noexcept
1135+ format = R"( template <typename D%> auto consume_%<D%>::%(%) const noexcept
11371136 {%
11381137 WINRT_IMPL_SHIM(%)->%(%);%
11391138 }
11401139)" ;
11411140 }
11421141 else
11431142 {
1144- format = R"( template <typename D%> WINRT_IMPL_AUTO(%) consume_%<D%>::%(%) const noexcept
1143+ format = R"( template <typename D%> auto consume_%<D%>::%(%) const noexcept
11451144 {%
11461145 WINRT_VERIFY_(0, WINRT_IMPL_SHIM(%)->%(%));%
11471146 }
@@ -1150,7 +1149,7 @@ namespace cppwinrt
11501149 }
11511150 else
11521151 {
1153- format = R"( template <typename D%> WINRT_IMPL_AUTO(%) consume_%<D%>::%(%) const
1152+ format = R"( template <typename D%> auto consume_%<D%>::%(%) const
11541153 {%
11551154 check_hresult(WINRT_IMPL_SHIM(%)->%(%));%
11561155 }
@@ -1159,7 +1158,6 @@ namespace cppwinrt
11591158
11601159 w.write (format,
11611160 bind<write_comma_generic_typenames>(generics),
1162- signature.return_signature (),
11631161 type_impl_name,
11641162 bind<write_comma_generic_types>(generics),
11651163 method_name,
@@ -1207,14 +1205,13 @@ namespace cppwinrt
12071205 // return static_cast<% const&>(*this).%(%);
12081206 //
12091207
1210- std::string_view format = R"( inline WINRT_IMPL_AUTO(%) %::%(%) const%
1208+ std::string_view format = R"( inline auto %::%(%) const%
12111209 {
12121210 return [&](% const& winrt_impl_base) { return winrt_impl_base.%(%); }(*this);
12131211 }
12141212)" ;
12151213
12161214 w.write (format,
1217- signature.return_signature (),
12181215 class_type.TypeName (),
12191216 method_name,
12201217 bind<write_consume_params>(signature),
@@ -1999,7 +1996,7 @@ struct __declspec(empty_bases) produce_dispatch_to_overridable<T, D, %>
19991996
20001997 static void write_interface_override_method (writer& w, MethodDef const & method, std::string_view const & interface_name)
20011998 {
2002- auto format = R"( template <typename D> WINRT_IMPL_AUTO(%) %T<D>::%(%) const%
1999+ auto format = R"( template <typename D> auto %T<D>::%(%) const%
20032000 {
20042001 return shim().template try_as<%>().%(%);
20052002 }
@@ -2009,7 +2006,6 @@ struct __declspec(empty_bases) produce_dispatch_to_overridable<T, D, %>
20092006 auto method_name = get_name (method);
20102007
20112008 w.write (format,
2012- signature.return_signature (),
20132009 interface_name,
20142010 method_name,
20152011 bind<write_consume_params>(signature),
0 commit comments