Boost logo

Boost Users :

From: Doug Mahlum (DMahlum_at_[hidden])
Date: 2008-07-24 14:05:20


Why does the atomic_count ++ operator return a "long" for the
win32,solaris and

sync compilers, but returns "void" for all gcc compilers? The --
operator returns a

"long" in all cases, so this would appear to be an annoying, anomalous
behavior.

But hopefully a rational explanation exists.

Also, if it's the value of the ++ that is wanted, two threads could
return the same

value of this atomic counter, since another call is required to obtain
it for the gcc case.

 

Thank you,

Doug



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net