Skip to content

Commit 8b96229

Browse files
committed
type-function.h: Fix CustomBuildField overload
Fix std::function CustomBuildField overload which is incompatible with a recent change in 3a96cdc from bitcoin-core#172 which changed generated IPC client code to pass it an rvalue std::function reference instead of an lvalue reference. There was no test coverage for the type-function.h header earlier but the next commit adds a test which would have caught the problem in the CustomBuildField declaration. Motivation for this change is to avoid a build error in bitcoin/bitcoin#29409 when rebased on top of bitcoin/bitcoin#32641 which includes bitcoin-core#172
1 parent 27c7e8e commit 8b96229

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/mp/type-function.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ template <typename Value, typename FnR, typename... FnParams, typename Output>
2424
void CustomBuildField(TypeList<std::function<FnR(FnParams...)>>,
2525
Priority<1>,
2626
InvokeContext& invoke_context,
27-
Value& value,
27+
Value&& value,
2828
Output&& output)
2929
{
3030
if (value) {

0 commit comments

Comments
 (0)