
21 Dec
2005
21 Dec
'05
11:05 a.m.
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.