Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/libexpr/include/nix/expr/nixexpr.hh
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ public:
[[gnu::always_inline]]
C * add(auto &&... args)
{
return new C(std::forward<decltype(args)>(args)...);
return alloc.new_object<C>(std::forward<decltype(args)>(args)...);
}

// we define some calls to add explicitly so that the argument can be passed in as initializer lists
Expand All @@ -822,15 +822,15 @@ public:
C * add(const PosIdx & pos, Expr * fun, std::vector<Expr *> && args)
requires(std::same_as<C, ExprCall>)
{
return new C(pos, fun, std::move(args));
return alloc.new_object<C>(pos, fun, std::move(args));
}

template<class C>
[[gnu::always_inline]]
C * add(const PosIdx & pos, Expr * fun, std::vector<Expr *> && args, PosIdx && cursedOrEndPos)
requires(std::same_as<C, ExprCall>)
{
return new C(pos, fun, std::move(args), std::move(cursedOrEndPos));
return alloc.new_object<C>(pos, fun, std::move(args), std::move(cursedOrEndPos));
}

template<class C>
Expand Down
Loading