Boost logo

Boost :

From: Rene Jager (renej_frog_at_[hidden])
Date: 2004-06-19 13:49:11

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.


ps I know I shouldn't use detail/* stuff directly...


Boost list run by bdawes at, gregod at, cpdaniel at, john at