Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-06-27 10:48:10


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.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk