Boost logo

Boost :

From: Richard Jennings (richard.jennings_at_[hidden])
Date: 2005-12-21 06:05:35

I'm stuck with a basic problem with BOOST_BITFIELD, again using BCB6 and
compiling enum.cpp included with the library.

The lines:
   MouseKey A, B;
   A |= B;
fail to compile with 'bitfield_base<MouseKey>::m_value is not accessible'
in operator |= in bitfield.hpp.

Not sure what's intended here. It would seem that if the following
function is being instantiated:
void bitfield_base<MouseKey>::operator |= (const MouseKey& rhs)
   m_value |= rhs.m_value;
then m_value is not accessible since it's private to bitfield_base. If
rhs were of type bitfield_base then it would work.

Changing bitfield_base as follows:
void operator |= (const bitfield_base<T>& rhs)
   m_value |= rhs.m_value;

works for me.

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