diff --git a/dune/common/bitsetvector.hh b/dune/common/bitsetvector.hh index e513e3e479e3a5997bb84fe5655c041efb510aa5..2dd1e370f4bb8ee0038ffca9646a20a07c6eda8a 100644 --- a/dune/common/bitsetvector.hh +++ b/dune/common/bitsetvector.hh @@ -186,6 +186,8 @@ namespace Dune { object it references */ void operator & (); + + friend class BitSetVectorReference<block_size, Alloc>; }; /** diff --git a/dune/common/test/bitsetvectortest.cc b/dune/common/test/bitsetvectortest.cc index da317254d80c9b3741775e97296ab4f9a25ba507..e5c6f9b5dd93791d0695eef5db59f0c9ae026247 100644 --- a/dune/common/test/bitsetvectortest.cc +++ b/dune/common/test/bitsetvectortest.cc @@ -95,6 +95,34 @@ void testContainer(BBF & bbf) z != y; y != z; + // &= + y &= cbbf[2]; + y &= bbf[3]; + y &= x; + x &= y; + x &= z; + y &= z; + + // |= + y |= cbbf[2]; + y |= bbf[3]; + y |= x; + x |= y; + x |= z; + y |= z; + + // ^= + y ^= cbbf[2]; + y ^= bbf[3]; + y ^= x; + x ^= y; + x ^= z; + y ^= z; + + // shift operator + y <<= 1; + y >>= 1; + // flip y.flip(); y.flip(2);