File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/libexpr/include/nix/expr Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -813,7 +813,7 @@ public:
813813 [[gnu::always_inline]]
814814 C * add (auto &&... args)
815815 {
816- return new C (std::forward<decltype (args)>(args)...);
816+ return alloc. new_object <C> (std::forward<decltype (args)>(args)...);
817817 }
818818
819819 // we define some calls to add explicitly so that the argument can be passed in as initializer lists
@@ -822,15 +822,15 @@ public:
822822 C * add (const PosIdx & pos, Expr * fun, std::vector<Expr *> && args)
823823 requires(std::same_as<C, ExprCall>)
824824 {
825- return new C (pos, fun, std::move (args));
825+ return alloc. new_object <C> (pos, fun, std::move (args));
826826 }
827827
828828 template <class C >
829829 [[gnu::always_inline]]
830830 C * add (const PosIdx & pos, Expr * fun, std::vector<Expr *> && args, PosIdx && cursedOrEndPos)
831831 requires(std::same_as<C, ExprCall>)
832832 {
833- return new C (pos, fun, std::move (args), std::move (cursedOrEndPos));
833+ return alloc. new_object <C> (pos, fun, std::move (args), std::move (cursedOrEndPos));
834834 }
835835
836836 template <class C >
You can’t perform that action at this time.
0 commit comments