Skip to content

Commit 422923f

Browse files
committed
proxy-types: fix clang-tidy bugprone-use-after-move error
include/mp/proxy-types.h:203:98: error: 'values' used after it was forwarded [bugprone-use-after-move,-warnings-as-errors] 203 | CustomBuildField(TypeList<LocalTypes...>(), Priority<3>(), context, std::forward<Values>(values)..., | ^ include/mp/proxy-types.h:202:9: note: forward occurred here 202 | if (CustomHasValue(context, std::forward<Values>(values)...)) { | ^
1 parent c6784c6 commit 422923f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/mp/proxy-types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,15 +191,15 @@ void ThrowField(TypeList<std::exception>, InvokeContext& invoke_context, Input&&
191191
}
192192

193193
template <typename... Values>
194-
bool CustomHasValue(InvokeContext& invoke_context, Values&&... value)
194+
bool CustomHasValue(InvokeContext& invoke_context, const Values&... value)
195195
{
196196
return true;
197197
}
198198

199199
template <typename... LocalTypes, typename Context, typename... Values, typename Output>
200200
void BuildField(TypeList<LocalTypes...>, Context& context, Output&& output, Values&&... values)
201201
{
202-
if (CustomHasValue(context, std::forward<Values>(values)...)) {
202+
if (CustomHasValue(context, values...)) {
203203
CustomBuildField(TypeList<LocalTypes...>(), Priority<3>(), context, std::forward<Values>(values)...,
204204
std::forward<Output>(output));
205205
}

0 commit comments

Comments
 (0)