mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 00:08:07 +02:00
C API: fix: macos doesn't have std::bind_front
This commit is contained in:
parent
ab9250286a
commit
c6e28d8da2
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue