Skip to content

Add functor for bitwise comparisons

Alex Pearce requested to merge apearce-bitwise-tests into master

The test case is hopefully self explanatory.

auto prepared_pass = Functors::math::test_bit(0b1010, 0b0010).prepare();
auto prepared_fail = Functors::math::test_bit(0b1010, 0b0100).prepare();

BOOST_CHECK( prepared_pass() == true );
BOOST_CHECK( prepared_fail() == false );

The current use case is for checking that certain ODIN bits are set, see Moore!281 (merged).

Depends on !1742 (merged), so targets that branch; will switch to master once that's merged.

/cc @olupton

Edited by Alex Pearce

Merge request reports