Skip to content

Commit

Permalink
add union to nogc_new
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaTheFoxgirl committed Sep 17, 2024
1 parent 8f3a525 commit b018a8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/numem/mem/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ T nogc_construct(T, Args...)(Args args) if (is(T == struct) || is(T == class) ||
Allocates a new struct on the heap.
Immediately exits the application if out of memory.
*/
T* nogc_new(T, Args...)(Args args) if (is(T == struct)) {
T* nogc_new(T, Args...)(Args args) if (is(T == struct) || is(T == union)) {

version(Have_tinyd_rt) {
return (assumeNothrowNoGC(&__gc_new!(T, Args)))(args);
Expand Down

0 comments on commit b018a8d

Please sign in to comment.