File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1137,7 +1137,7 @@ namespace cppwinrt
11371137 {%
11381138 if constexpr (!std::is_same_v<D, %>)
11391139 {
1140- auto const [castedResult, code] = static_cast<D const*>(this)->template try_as_with_reason<%>();
1140+ auto const& [castedResult, code] = static_cast<D const*>(this)->template try_as_with_reason<%>();
11411141 check_hresult(code);
11421142 auto const abiType = *(abi_t<%>**)&castedResult;
11431143 abiType->%(%);
@@ -1156,7 +1156,7 @@ namespace cppwinrt
11561156 {%
11571157 if constexpr (!std::is_same_v<D, %>)
11581158 {
1159- auto const [castedResult, code] = static_cast<D const*>(this)->template try_as_with_reason<%>();
1159+ auto const& [castedResult, code] = static_cast<D const*>(this)->template try_as_with_reason<%>();
11601160 check_hresult(code);
11611161 auto const abiType = *(abi_t<%>**)&castedResult;
11621162 WINRT_VERIFY_(0, abiType->%(%));
@@ -1176,7 +1176,7 @@ namespace cppwinrt
11761176 {%
11771177 if constexpr (!std::is_same_v<D, %>)
11781178 {
1179- auto const [castedResult, code] = static_cast<D const*>(this)->template try_as_with_reason<%>();
1179+ auto const& [castedResult, code] = static_cast<D const*>(this)->template try_as_with_reason<%>();
11801180 check_hresult(code);
11811181 auto const abiType = *(abi_t<%>**)&castedResult;
11821182 check_hresult(abiType->%(%));
You can’t perform that action at this time.
0 commit comments