Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
fix Issue 9099 - core.atomic.atomicLoad() cannot handle non-POD structs
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Dec 30, 2012
1 parent 62f27eb commit 878a183
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/atomic.d
Expand Up @@ -369,7 +369,11 @@ else version( AsmX86_32 )
HeadUnshared!(T) atomicLoad(MemoryOrder ms = MemoryOrder.seq, T)( ref const shared T val ) nothrow
if(!__traits(isFloating, T))
{
static if( T.sizeof == byte.sizeof )
static if (!__traits(isPOD, T))
{
static assert( false, "argument to atomicLoad() must be POD" );
}
else static if( T.sizeof == byte.sizeof )
{
//////////////////////////////////////////////////////////////////
// 1 Byte Load
Expand Down

0 comments on commit 878a183

Please sign in to comment.