Quantcast
Channel: Can atomic types be assigned the value of another atomic variable? - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by MichalK for Can atomic types be assigned the value of another...

atomic<int> i1, i2;i1 = 0; // this is calling atomic<int>& atomic<int>::operator=(int)i2 = 1; // this is also calling atomic<int>& atomic<int>::operator=(int)i1 =...

View Article



Can atomic types be assigned the value of another atomic variable?

In Concurrency In Action, it is stated:All operations on an atomic type are defined as atomic, and assignmentand copy-construction involve two objects. A single operation on twodistinct objects can’t...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images