$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] Using BOOST_*_EQUAL on bit-fields?
From: Chris Cleeland (chris.cleeland_at_[hidden])
Date: 2013-03-07 16:39:46
I'm using the Boost Unit Test Framework and have a struct with bitfields
declared in it.
When I compile a unit test with code like this
StructWithBitfields mystruct;
StructWithBitfields otherstruct;
BOOST_CHECK_EQUAL(mystruct.bitfield, otherstruct.bitfield);
I get a compiler errors
error: non-const reference cannot bind to bit-field 'bitfield'
referring to both arguments to the macro.
Is there a preferred way for comparing bitfield values via unit test macros?
-- Chris Cleeland