Skip to content

Commit

Permalink
C API: fix: macos doesn't have std::bind_front
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickvP authored and jlesquembre committed Nov 28, 2023
1 parent 5125fb7 commit 674b027
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libexpr/c/nix_api_value.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ PrimOp * nix_alloc_primop(
if (context)
context->last_err_code = NIX_OK;
try {
using namespace std::placeholders;
auto p = new
#ifdef HAVE_BOEHMGC
(GC)
Expand All @@ -71,7 +72,7 @@ PrimOp * nix_alloc_primop(
.args = {},
.arity = (size_t) arity,
.doc = doc,
.fun = std::bind_front(nix_c_primop_wrapper, fun, user_data)};
.fun = std::bind(nix_c_primop_wrapper, fun, user_data, _1, _2, _3, _4)};
if (args)
for (size_t i = 0; args[i]; i++)
p->args.emplace_back(*args);
Expand Down

0 comments on commit 674b027

Please sign in to comment.