D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4756 - core.atomic should have atomicOp!"="
Summary: core.atomic should have atomicOp!"="
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: druntime (show other issues)
Version: D2
Hardware: Other Windows
: P2 normal
Assignee: Sean Kelly
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-29 08:47 UTC by David Simcha
Modified: 2011-08-12 20:36 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description David Simcha 2010-08-29 08:47:38 UTC
This is technically an enhancement, but it severely limits the usability of core.atomic and seems like a pretty silly omission.  The following code needs to work:

int num = 1;
atomicOp!"="(num, 2);  // Atomically set num to 2.
Comment 1 David Simcha 2011-08-12 20:36:31 UTC
Resolved by exposing atomic store.