[atomic_count] Different behaviour on different platforms

23 Mar
2007
23 Mar
'07
12:35 a.m.
Hi all, Is there a rational for the different behavior (signature) of the atomic_count::operator++()? This operator returns long (the new value) on Win32 and Solaris, but has no return type (void) on pthread and gcc based systems. Regards Hartmut

23 Mar
23 Mar
12:43 a.m.
New subject: [atomic_count] Different behaviour on different platforms
Hartmut Kaiser wrote:
Hi all,
Is there a rational for the different behavior (signature) of the atomic_count::operator++()?
This operator returns long (the new value) on Win32 and Solaris, but has no return type (void) on pthread and gcc based systems.
No reason. In the "specification" in atomic_count.hpp I see that ++a is documented as having no return value. So 'void' is correct and 'long' can be considered correct but misleading.
6658
Age (days ago)
6658
Last active (days ago)
1 comments
2 participants
participants (2)
-
Hartmut Kaiser
-
Peter Dimov