
27 Jun
2004
27 Jun
'04
3:48 p.m.
Rene Jager wrote:
trying to do:
boost::detail::atomic_count c(0); std::cout << long(c) << std::endl;
with gcc 3.2.2 gives:
/usr/include/boost/detail/atomic_count_gcc.hpp: In member function `boost::detail::atomic_count::operator long int() const': /usr/include/boost/detail/atomic_count_gcc.hpp:46: invalid conversion from ` const _Atomic_word*' to `volatile _Atomic_word*'
in the following function:
operator long() const { return __exchange_and_add(&value_, 0); }
The problem can be solved by making the private member "_Atomic_word value_" mutable.
Fixed in CVS.