Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive
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
5 changes: 1 addition & 4 deletions src/core/atomic.d
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,7 @@ TailShared!T atomicLoad(MemoryOrder ms = MemoryOrder.seq, T)(ref shared const T
// HACK: DEPRECATE THIS FUNCTION, IT IS INVALID TO DO ATOMIC LOAD OF SHARED CLASS
// this is here because code exists in the wild that does this...

import core.lifetime : move;

T r = core.internal.atomic.atomicLoad!ms(cast(T*)&val);
return move(*cast(TailShared!T*)&r);
return core.internal.atomic.atomicLoad!ms(cast(TailShared!T*)&val);
}

/**
Expand Down